diff --git a/modules/lattice-service-listener/README.md b/modules/lattice-service-listener/README.md
index aa6e217..88d3df7 100644
--- a/modules/lattice-service-listener/README.md
+++ b/modules/lattice-service-listener/README.md
@@ -46,7 +46,7 @@ This module creates following resources.
| [resource\_group\_description](#input\_resource\_group\_description) | (Optional) The description of Resource Group. | `string` | `"Managed by Terraform."` | no |
| [resource\_group\_enabled](#input\_resource\_group\_enabled) | (Optional) Whether to create Resource Group to find and group AWS resources which are created by this module. | `bool` | `true` | no |
| [resource\_group\_name](#input\_resource\_group\_name) | (Optional) The name of Resource Group. A Resource Group name can have a maximum of 127 characters, including letters, numbers, hyphens, dots, and underscores. The name cannot start with `AWS` or `aws`. | `string` | `""` | no |
-| [rules](#input\_rules) | (Optional) The configuration for the parameters of the default routing action. `default_action_parameters` block as defined below.
(Optional) `status_code` - The status code of HTTP response. Valid values are `2XX`, `4XX`, or `5XX`. Defaults to `503`. Only supported if `default_action_type` is `FIXED_RESPONSE`.
(Required) `targets` - A list of target configurations to route traffic. To route to a single target group, use `default_action_type` as `FORWARD`. Only supported if `default_action_type` is `WEIGHTED_FORWARD`. Each item of `targets` block as defined below.
(Required) `target_group` - The ARN of the target group to which to route traffic.
(Optional) `weight` - The weight to use routing traffic to `target_group`. Valid value is `0` to `999`. Defaults to `1`. |
list(object({| `[]` | no | +| [rules](#input\_rules) | (Optional) A list of rules to enable content-based routing to the target groups that make up the service. Each rule consists of a priority, one or more actions, and one or more conditions.
priority = number
name = optional(string)
action_type = string
action_parameters = optional(object({
status_code = optional(number, 404)
destinations = optional(list(object({
target_group = string
weight = optional(number, 100)
})), [])
}), {})
}))
list(object({| `[]` | no | | [tags](#input\_tags) | (Optional) A map of tags to add to all resources. | `map(string)` | `{}` | no | ## Outputs @@ -60,7 +60,7 @@ This module creates following resources. | [name](#output\_name) | The name of the service listener. | | [port](#output\_port) | The number of port on which the listener of the service is listening. | | [protocol](#output\_protocol) | The protocol for the service listener. | -| [rules](#output\_rules) | The configuration for default routing action of the service listener.
priority = number
name = optional(string)
conditions = object({
method = optional(string)
path = object({
value = string
operator = optional(string, "PREFIX")
case_sensitive = optional(bool, false)
})
headers = optional(list(object({
name = string
value = string
operator = optional(string, "EXACT")
case_sensitive = optional(bool, false)
})), [])
})
action_type = string
action_parameters = optional(object({
status_code = optional(number, 404)
destinations = optional(list(object({
target_group = string
weight = optional(number, 100)
})), [])
}), {})
}))
object({| `null` | no | | [description](#input\_description) | (Optional) The description of the service. This creates a tag with a key of `Description` and a value that you specify. | `string` | `"Managed by Terraform."` | no | -| [listeners](#input\_listeners) | (Optional) The configuration to add one or more listeners for the service. Set up listeners and rules to define how network traffic is routed within the service. A listener is a process that checks for connection requests, using the protocol and port that you configure. Each listener has a default action, and you can optionally define rules to enable content-based routing to the target groups that make up your service. Each block of `listeners` as defined below.
name = string
tls_certificate = optional(string)
})
list(object({| `[]` | no | +| [listeners](#input\_listeners) | (Optional) The configuration to add one or more listeners for the service. Set up listeners and rules to define how network traffic is routed within the service. A listener is a process that checks for connection requests, using the protocol and port that you configure. Each listener has a default action, and you can optionally define rules to enable content-based routing to the target groups that make up your service. Each block of `listeners` as defined below.
name = string
port = optional(number)
protocol = string
default_action_type = string
default_action_parameters = optional(object({
status_code = optional(number, 404)
destinations = optional(list(object({
target_group = string
weight = optional(number, 100)
})), [])
}), {})
rules = optional(list(object({
priority = number
name = optional(string)
action_type = string
action_parameters = optional(object({
status_code = optional(number, 404)
destinations = optional(list(object({
target_group = string
weight = optional(number, 100)
})), [])
}), {})
})), [])
tags = optional(map(string), {})
}))
list(object({| `[]` | no | | [logging\_to\_cloudwatch](#input\_logging\_to\_cloudwatch) | (Optional) The configuration to enable access logs to be sent to Amazon CloudWatch Log Group. The service owner can use the access logs to audit the services in the network. The service owner will only see access logs from clients and services that are associated with their service. Access log entries represent traffic originated from VPCs associated with that network. `logging_to_cloudwatch` as defined below.
name = string
port = optional(number)
protocol = string
default_action_type = string
default_action_parameters = optional(object({
status_code = optional(number, 404)
destinations = optional(list(object({
target_group = string
weight = optional(number, 100)
})), [])
}), {})
rules = optional(list(object({
priority = number
name = optional(string)
conditions = object({
method = optional(string)
path = object({
value = string
operator = optional(string, "PREFIX")
case_sensitive = optional(bool, false)
})
headers = optional(list(object({
name = string
value = string
operator = optional(string, "EXACT")
case_sensitive = optional(bool, false)
})), [])
})
action_type = string
action_parameters = optional(object({
status_code = optional(number, 404)
destinations = optional(list(object({
target_group = string
weight = optional(number, 100)
})), [])
}), {})
})), [])
tags = optional(map(string), {})
}))
object({| `{}` | no | | [logging\_to\_kinesis\_data\_firehose](#input\_logging\_to\_kinesis\_data\_firehose) | (Optional) The configuration to enable access logs to be sent to Amazon Kinesis Data Firehose. The service owner can use the access logs to audit the services in the network. The service owner will only see access logs from clients and services that are associated with their service. Access log entries represent traffic originated from VPCs associated with that network. `logging_to_kinesis_data_firehose` as defined below.
enabled = optional(bool, false)
log_group = optional(string, "")
})
object({| `{}` | no | | [logging\_to\_s3](#input\_logging\_to\_s3) | (Optional) The configuration to enable access logs to be sent to Amazon S3 Bucket. The service owner can use the access logs to audit the services in the network. The service owner will only see access logs from clients and services that are associated with their service. Access log entries represent traffic originated from VPCs associated with that network. `logging_to_s3` as defined below.
enabled = optional(bool, false)
delivery_stream = optional(string, "")
})
object({| `{}` | no | diff --git a/modules/lattice-service/variables.tf b/modules/lattice-service/variables.tf index f9efe05..10e4ad1 100644 --- a/modules/lattice-service/variables.tf +++ b/modules/lattice-service/variables.tf @@ -125,6 +125,21 @@ variable "listeners" { priority = number name = optional(string) + conditions = object({ + method = optional(string) + path = object({ + value = string + operator = optional(string, "PREFIX") + case_sensitive = optional(bool, false) + }) + headers = optional(list(object({ + name = string + value = string + operator = optional(string, "EXACT") + case_sensitive = optional(bool, false) + })), []) + }) + action_type = string action_parameters = optional(object({ status_code = optional(number, 404)
enabled = optional(bool, false)
bucket = optional(string, "")
})