Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix aws_appautoscaling_target default tags tf plan pollution #33

Closed
wants to merge 1 commit into from
Closed
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
8 changes: 7 additions & 1 deletion modules/core/ecs-autoscaling-target/main.tf
Original file line number Diff line number Diff line change
@@ -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}"
Expand All @@ -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
Expand Down
Loading