Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ Note that this example may create resources which will incur monetary charges on
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.34 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.34 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion examples/complete/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.34"
}
}
}
4 changes: 2 additions & 2 deletions examples/ec2-autoscaling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ Note that this example may create resources which will incur monetary charges on
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.34 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.34 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion examples/ec2-autoscaling/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.34"
}
}
}
4 changes: 2 additions & 2 deletions examples/fargate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ Note that this example may create resources which will incur monetary charges on
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.34 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.34 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion examples/fargate/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.34"
}
}
}
4 changes: 2 additions & 2 deletions modules/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ module "ecs_cluster" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.34 |
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.13 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.34 |
| <a name="provider_time"></a> [time](#provider\_time) | >= 0.13 |

## Modules
Expand Down
2 changes: 1 addition & 1 deletion modules/cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.34"
}
time = {
source = "hashicorp/time"
Expand Down
4 changes: 2 additions & 2 deletions modules/container-definition/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ module "example_ecs_container_definition" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.34 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.34 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/container-definition/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.34"
}
}

Expand Down
4 changes: 2 additions & 2 deletions modules/express-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ module "ecs_express_service" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.34 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.34 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/express-service/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.34"
}
}

Expand Down
6 changes: 3 additions & 3 deletions modules/service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ module "ecs_service" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.28 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.34 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.28 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.34 |

## Modules

Expand Down Expand Up @@ -312,7 +312,7 @@ module "ecs_service" {
| <a name="input_security_group_name"></a> [security\_group\_name](#input\_security\_group\_name) | Name to use on security group created | `string` | `null` | no |
| <a name="input_security_group_tags"></a> [security\_group\_tags](#input\_security\_group\_tags) | A map of additional tags to add to the security group created | `map(string)` | `{}` | no |
| <a name="input_security_group_use_name_prefix"></a> [security\_group\_use\_name\_prefix](#input\_security\_group\_use\_name\_prefix) | Determines whether the security group name (`security_group_name`) is used as a prefix | `bool` | `true` | no |
| <a name="input_service_connect_configuration"></a> [service\_connect\_configuration](#input\_service\_connect\_configuration) | The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace | <pre>object({<br/> enabled = optional(bool, true)<br/> log_configuration = optional(object({<br/> log_driver = string<br/> options = optional(map(string))<br/> secret_option = optional(list(object({<br/> name = string<br/> value_from = string<br/> })))<br/> }))<br/> namespace = optional(string)<br/> service = optional(list(object({<br/> client_alias = optional(object({<br/> dns_name = optional(string)<br/> port = number<br/> test_traffic_rules = optional(list(object({<br/> header = optional(object({<br/> name = string<br/> value = object({<br/> exact = string<br/> })<br/> }))<br/> })))<br/> }))<br/> discovery_name = optional(string)<br/> ingress_port_override = optional(number)<br/> port_name = string<br/> timeout = optional(object({<br/> idle_timeout_seconds = optional(number)<br/> per_request_timeout_seconds = optional(number)<br/> }))<br/> tls = optional(object({<br/> issuer_cert_authority = object({<br/> aws_pca_authority_arn = string<br/> })<br/> kms_key = optional(string)<br/> role_arn = optional(string)<br/> }))<br/> })))<br/> })</pre> | `null` | no |
| <a name="input_service_connect_configuration"></a> [service\_connect\_configuration](#input\_service\_connect\_configuration) | The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace | <pre>object({<br/> enabled = optional(bool, true)<br/> access_log_configuration = optional(object({<br/> format = string<br/> include_query_parameters = optional(string)<br/> }))<br/> log_configuration = optional(object({<br/> log_driver = string<br/> options = optional(map(string))<br/> secret_option = optional(list(object({<br/> name = string<br/> value_from = string<br/> })))<br/> }))<br/> namespace = optional(string)<br/> service = optional(list(object({<br/> client_alias = optional(object({<br/> dns_name = optional(string)<br/> port = number<br/> test_traffic_rules = optional(list(object({<br/> header = optional(object({<br/> name = string<br/> value = object({<br/> exact = string<br/> })<br/> }))<br/> })))<br/> }))<br/> discovery_name = optional(string)<br/> ingress_port_override = optional(number)<br/> port_name = string<br/> timeout = optional(object({<br/> idle_timeout_seconds = optional(number)<br/> per_request_timeout_seconds = optional(number)<br/> }))<br/> tls = optional(object({<br/> issuer_cert_authority = object({<br/> aws_pca_authority_arn = string<br/> })<br/> kms_key = optional(string)<br/> role_arn = optional(string)<br/> }))<br/> })))<br/> })</pre> | `null` | no |
| <a name="input_service_registries"></a> [service\_registries](#input\_service\_registries) | Service discovery registries for the service | <pre>object({<br/> container_name = optional(string)<br/> container_port = optional(number)<br/> port = optional(number)<br/> registry_arn = string<br/> })</pre> | `null` | no |
| <a name="input_service_tags"></a> [service\_tags](#input\_service\_tags) | A map of additional tags to add to the service | `map(string)` | `{}` | no |
| <a name="input_sigint_rollback"></a> [sigint\_rollback](#input\_sigint\_rollback) | Whether to enable graceful termination of deployments using SIGINT signals. Only applicable when using ECS deployment controller and requires wait\_for\_steady\_state = true. Default is false | `bool` | `null` | no |
Expand Down
19 changes: 19 additions & 0 deletions modules/service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,15 @@ resource "aws_ecs_service" "this" {
content {
enabled = service_connect_configuration.value.enabled

dynamic "access_log_configuration" {
for_each = service_connect_configuration.value.access_log_configuration != null ? [service_connect_configuration.value.access_log_configuration] : []

content {
format = access_log_configuration.value.format
include_query_parameters = access_log_configuration.value.include_query_parameters
}
}

dynamic "log_configuration" {
for_each = service_connect_configuration.value.log_configuration != null ? [service_connect_configuration.value.log_configuration] : []

Expand Down Expand Up @@ -540,6 +549,16 @@ resource "aws_ecs_service" "ignore_task_definition" {
content {
enabled = service_connect_configuration.value.enabled


dynamic "access_log_configuration" {
for_each = service_connect_configuration.value.access_log_configuration != null ? [service_connect_configuration.value.access_log_configuration] : []

content {
format = access_log_configuration.value.format
include_query_parameters = access_log_configuration.value.include_query_parameters
}
}

dynamic "log_configuration" {
for_each = service_connect_configuration.value.log_configuration != null ? [service_connect_configuration.value.log_configuration] : []

Expand Down
4 changes: 4 additions & 0 deletions modules/service/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ variable "service_connect_configuration" {
description = "The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace"
type = object({
enabled = optional(bool, true)
access_log_configuration = optional(object({
format = string
include_query_parameters = optional(string)
}))
log_configuration = optional(object({
log_driver = string
options = optional(map(string))
Expand Down
2 changes: 1 addition & 1 deletion modules/service/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.34"
}
}

Expand Down
4 changes: 4 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,10 @@ variable "services" {
scheduling_strategy = optional(string)
service_connect_configuration = optional(object({
enabled = optional(bool)
access_log_configuration = optional(object({
format = string
include_query_parameters = optional(string)
}))
log_configuration = optional(object({
log_driver = string
options = optional(map(string))
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.34"
}
}

Expand Down
2 changes: 1 addition & 1 deletion wrappers/cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.34"
}
time = {
source = "hashicorp/time"
Expand Down
2 changes: 1 addition & 1 deletion wrappers/container-definition/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.34"
}
}

Expand Down
2 changes: 1 addition & 1 deletion wrappers/express-service/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.34"
}
}

Expand Down
2 changes: 1 addition & 1 deletion wrappers/service/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.34"
}
}

Expand Down
2 changes: 1 addition & 1 deletion wrappers/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 6.28"
version = ">= 6.34"
}
}

Expand Down