-
-
Notifications
You must be signed in to change notification settings - Fork 232
feat: Add support for ignoring vpc changes to support cross account zone associations
#128
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
Conversation
Sharsie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change makes the most sense to me this way (well, since I suggested it), the only thing I'm lacking is ignore_vpc explanation
| } | ||
|
|
||
| variable "ignore_vpc" { | ||
| description = "Determines whether to ignore VPC association changes after creation to avoid disruptive diffs when using `aws_route53_zone_association` resource(s). Changing is a destructive action; users should be prepared to use Terraform state move commands/blocks when changing this value" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I would be a little more explicit about the resources, but this is already providing the critical information, up to you
-users should be prepared to use Terraform state move commands/blocks when changing this value
+users should be prepared to use Terraform state move commands/blocks when changing this value to switch between aws_route53_zone.this[0] and aws_route53_zone.ignore_vpc[0] resourcesThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
99.999% of users won't read this - this clarification should be enough and will get more attention 300b46b
| } | ||
| } | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ignore_vpc should be mentioned/explained here. Maybe more explicit description (as per my previous comment) could be avoided and ignore_vpc could be documented in this section in a better way. Ideally, aws_route53_zone_association docs could be linked for clarification as to why this is needed.
Now feel free to ignore me or rewrite this completely to your liking, but I'm at least going to provide a suggestion:
> [!WARNING]
>
> Associating the zone using standalone resources causes disruptive diffs on the aws_route53_zone resource.
>
> For this reason the `ignore_vpc` variable is provided to avoid inconsistent plans. Changing the value of this variable is destructive and will cause recreation of the aws_route53_zone resource.
>
> It is necessary to use terraform state move command/block to switch between the different aws_route53_zone resource to prevent this behaviour.
```hcl
# When changing ignore_vpc to true
moved {
from = aws_route53_zone.this[0]
to = aws_route53_zone.ignore_vpc[0]
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clarified in 300b46b
1448635 to
300b46b
Compare
## [6.1.0](v6.0.2...v6.1.0) (2025-09-25) ### Features * Add support for ignoring `vpc` changes to support cross account zone associations ([#128](#128)) ([8e74e63](8e74e63))
|
This PR is included in version 6.1.0 🎉 |
|
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
vpcchanges to support cross account zone associationsMotivation and Context
Breaking Changes
How Has This Been Tested?
examples/*to demonstrate and validate my change(s)examples/*projectspre-commit run -aon my pull request