You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This appears to be an issue with AWS's "eventual consistency" model of resource management. Although you can see the old subnet was deleted
module.dynamic_subnets.aws_subnet.private[2]: Destruction complete after 2s
the old CIDR is not released in time for it to be reallocated. Usually running plan and apply a second time resolves the issue. So this is more of an issue for Terraform and AWS than for this module specifically. However, if you find a solution we can implement, please let us know, or better yet open a PR that implements it.
It turns out this was an unexpected and unintended side-effect of enabling create_before_destroy behavior on the NAT Gateways and NAT Instances, which rippled into create_before_destroy behavior of the subnets.
Found a bug? Maybe our Slack Community can help.
Describe the Bug
When changing an AZ (eg 1c to 1d), the apply fails.
Expected Behavior
The apply to not fail and the affected subnets to be recreated.
Steps to Reproduce
Steps to reproduce the behavior:
terraform init && terraform apply -auto-approve
us-east-1c
tous-east-1d
and runterraform apply -auto-approve
Output is similar to:
It appears to not try to destroy the public subnet for the old 1c region.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: