From 80dac1818a7506819f93d7fe24713085cf2a2689 Mon Sep 17 00:00:00 2001 From: Navfarm Date: Fri, 23 Feb 2024 15:15:57 +0800 Subject: [PATCH] Adding Options for Enabling ECS Service Connect --- README.md | 1 - main.tf | 2 +- variables.tf | 6 ------ 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/README.md b/README.md index 1167135..59fef76 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,6 @@ No resources. | [link\_ecs\_to\_asg\_capacity\_provider](#input\_link\_ecs\_to\_asg\_capacity\_provider) | Specify whether to link ECS to autoscaling group capacity provider | `bool` | `false` | no | | [name](#input\_name) | Name of the product/project/application | `string` | `""` | no | | [platform\_version](#input\_platform\_version) | Platform version (applicable for FARGATE launch type) | `string` | `"LATEST"` | no | -| [service\_connect\_configuration](#input\_service\_connect\_configuration) | Configures a Service Connect | `map(string)` | `{}` | no | | [service\_connect\_defaults](#input\_service\_connect\_defaults) | Configures a Service Connect Namespace | `map(string)` | `{}` | no | | [service\_deployment\_maximum\_percent](#input\_service\_deployment\_maximum\_percent) | Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy. | `number` | `200` | no | | [service\_deployment\_minimum\_healthy\_percent](#input\_service\_deployment\_minimum\_healthy\_percent) | Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment. | `number` | `100` | no | diff --git a/main.tf b/main.tf index 879cdb0..d9215d9 100644 --- a/main.tf +++ b/main.tf @@ -79,7 +79,7 @@ module "service" { capacity_provider_strategy = var.default_capacity_provider_strategy - service_connect_configuration = length(var.service_connect_defaults) > 0 ? var.service_connect_configuration : {} + service_connect_configuration = length(var.service_connect_defaults) > 0 ? try(each.value.service_connect_configuration, {}) : {} } module "service_cpu_autoscaling_policy" { diff --git a/variables.tf b/variables.tf index 2ab43e3..4908146 100644 --- a/variables.tf +++ b/variables.tf @@ -89,12 +89,6 @@ variable "enable_execute_command" { default = false } -variable "service_connect_configuration" { - description = "Configures a Service Connect" - type = map(string) - default = {} -} - ################################################################################ # Autoscaling group ################################################################################