Skip to content

Conversation

@bryantbiggs
Copy link
Member

Description

  • Add support for ignoring vpc changes to support cross account zone associations

Motivation and Context

Breaking Changes

  • No

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

Copy link

@Sharsie Sharsie left a 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"
Copy link

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] resources

Copy link
Member Author

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

}
}
```

Copy link

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]
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clarified in 300b46b

@bryantbiggs bryantbiggs merged commit 8e74e63 into master Sep 25, 2025
10 checks passed
@bryantbiggs bryantbiggs deleted the feat/cross-account branch September 25, 2025 19:33
antonbabenko pushed a commit that referenced this pull request Sep 25, 2025
## [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))
@antonbabenko
Copy link
Member

This PR is included in version 6.1.0 🎉

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aws_route53_zone dynamic block conflicts with aws_route53_vpc_association_authorization

4 participants