我将 Terraform v0.12.25 与 provider.aws v2.70.0 一起使用。我在 Terraform 中定义了 ASG 资源:
resource "aws_autoscaling_group" "web" {
name = "CodeDeploy_production_web"
max_size = 40
min_size = 1
wait_for_capacity_timeout = "0"
health_check_type = "EC2"
desired_capacity = 1
launch_configuration = aws_launch_configuration.web.name
vpc_zone_identifier = data.aws_subnet_ids.subnets.ids
suspended_processes = []
tag {
key = "Environment"
propagate_at_launch = true
value = "production"
}
tag {
key = "Name"
propagate_at_launch = true
value = "Web_App_production_CD"
}
tag {
key = "CodeDeployProvisioningDeploymentId"
propagate_at_launch = true
value = ""
}
lifecycle {
ignore_changes = [
desired_capacity,
name
]
}
}
我想忽略标签“CodeDeployProvisioningDeploymentId”上的更改。我已经尝试将它添加到ignore_changes
阻止,但我没有成功使它工作。有谁知道如何做到这一点?