route53_vpc_association_authorization + aws_route53_zone_association makes Terraform attempt to delete associations on subsequent runs #14872
Labels
documentation
Introduces or discusses updates to documentation.
service/route53
Issues and PRs that pertain to the route53 service.
Community Note
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
Terraform Configuration Files
You should be able to reproduce this using the specific example from the docs on
aws_route53_vpc_association_authorization
here.Here is my lightly-changed version of it (difference perhaps is the use of a
data
provider?This works great on the first run. On subsequent runs, Terraform attempts to delete all but the first in-line associated VPC.
Expected Behavior
This works on the first run. On subsequent runs, I expect the zone associations to remain in place.
We need to mix the use of in-line VPC associations with the use of the separate
aws_route53_zone_association
using this method, otherwise I believe we'd get a circular dependency issue.Actual Behavior
On subsequent runs, I see two things that seem odd:
First:
The main issue: Terraform believes it needs to delete all but one associated VPC association. The one VPC association it keeps is the one added as an in-line block within the
aws_route53_zone
resource (which requires at least one to be a private zone):Second
All VPC associations added via
aws_route53_zone_association
appears as an in-line VPC association within the plan, rather than a separate resource, which feels like a clue towards what might be a bug here.Steps to Reproduce
You should be able to reproduce this using the specific example from the docs on
aws_route53_vpc_association_authorization
here.terraform apply
to create the resourcesterraform plan
orterraform apply
again to see it attempting to delete the VPC associations added as aaws_route53_zone_association
resourceLet me know if I can provide additional information!
The text was updated successfully, but these errors were encountered: