diff --git a/modules/core/ecs-autoscaling-target/main.tf b/modules/core/ecs-autoscaling-target/main.tf index 7b20237..4869ac5 100644 --- a/modules/core/ecs-autoscaling-target/main.tf +++ b/modules/core/ecs-autoscaling-target/main.tf @@ -1,6 +1,11 @@ resource "aws_appautoscaling_target" "ecs_target" { count = var.ignore_capacity_changes ? 0 : 1 + # Workaround for https://github.com/hashicorp/terraform-provider-aws/issues/31261 + lifecycle { + ignore_changes = [tags_all] + } + min_capacity = var.min_capacity max_capacity = var.max_capacity resource_id = "service/${var.ecs_cluster_name}/${var.ecs_service_name}" @@ -11,8 +16,9 @@ resource "aws_appautoscaling_target" "ecs_target" { resource "aws_appautoscaling_target" "ecs_target_ignore_capacity_changes" { count = var.ignore_capacity_changes ? 1 : 0 + # Workaround for https://github.com/hashicorp/terraform-provider-aws/issues/31261 lifecycle { - ignore_changes = [min_capacity, max_capacity] + ignore_changes = [min_capacity, max_capacity, tags_all] } min_capacity = var.min_capacity