Closed jgeurts closed 3 years ago
Curious if the loop to specify the subnets is causing the issue. I had thought, based on the debug output, that the sort order of the subnet ids was causing terraform to think the values were different.
State for the ecs service looks like:
{
"module": "module.platform-web",
"mode": "managed",
"type": "aws_ecs_service",
"name": "platform",
"each": "list",
"provider": "provider.aws",
"instances": [
{
"index_key": 0,
"schema_version": 0,
"attributes": {
"capacity_provider_strategy": [],
"cluster": "arn:aws:ecs:us-east-1:848340966175:cluster/platform",
"deployment_controller": [
{
"type": "CODE_DEPLOY"
}
],
"deployment_maximum_percent": 200,
"deployment_minimum_healthy_percent": 100,
"desired_count": 1,
"enable_ecs_managed_tags": true,
"health_check_grace_period_seconds": 0,
"iam_role": "aws-service-role",
"id": "arn:aws:ecs:us-east-1:848340966175:service/platform/platform",
"launch_type": "FARGATE",
"load_balancer": [
{
"container_name": "web",
"container_port": 8080,
"elb_name": "",
"target_group_arn": "arn:aws:elasticloadbalancing:us-east-1:848340966175:targetgroup/platform-tg-1/9f95fe83039b0885"
}
],
"name": "platform",
"network_configuration": [
{
"assign_public_ip": false,
"security_groups": [
"sg-009780f1c0a07fd3b"
],
"subnets": [
"subnet-04513c92e9c910d63",
"subnet-071d6528a750de464"
]
}
],
"ordered_placement_strategy": [],
"placement_constraints": [],
"placement_strategy": [],
"platform_version": "1.3.0",
"propagate_tags": "NONE",
"scheduling_strategy": "REPLICA",
"service_registries": [],
"tags": {
"Name": "platform",
"Type": "Private"
},
"task_definition": "platform:6"
},
"private": "bnVsbA==",
"dependencies": [
"module.platform-container-repository.aws_ecr_repository.platform",
"module.platform-web.aws_ecs_cluster.platform",
"module.platform-web.aws_ecs_task_definition.platform",
"module.platform-web.aws_lb_target_group.platform",
"module.platform-web.aws_security_group.ecs",
"module.platform-web.aws_subnet.lb"
]
}
]
},
Hey @jgeurts ๐ Thank you for taking the time to file this! Given that there's been a number of AWS provider releases since you initially filed it, can you confirm if you're still experiencing this behavior?
@justinretzolk Yep, it's still an issue
Hey @jgeurts ๐ Thanks for getting back to me. I started to look into this more and came across another issue that seems to be a duplicate of this - #13658. We like to try to keep discussions consolidated, and while this issue issue is older, the other has a bit more discussion and ๐ reactions that we use to help with prioritization. With that in mind, weโre going to close this issue in favor of #13658.
I'm going to lock this issue because it has been closed for 30 days โณ. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Community Note
Terraform Version
0.12.21
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/jgeurts/f4d930608a119e9cd75a7a54b111ee7c
Panic Output
Expected Behavior
It should update the ecs service with only the desired_count value
Actual Behavior
network_configuration was attempted to be updated.
Steps to Reproduce
terraform apply
Important Factoids
n/a