-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
provider/aws: Make the type of a route53_record changeable #11164
provider/aws: Make the type of a route53_record changeable #11164
Conversation
facf113
to
bb4607f
Compare
Utilize the ChangeResourceRecordSets to change the type of a record by deleting and recreating with a new type. As change batches are considered transactional changes, Amazon Route 53 either makes all or none of the changes in the batch request ensuring the update will never be partially applied.
bb4607f
to
ef0196f
Compare
Hey @johanneswuerbach thanks for the fix! This looks good to me, but I'm going to delay merging it a bit. #9732 probably shouldn't happen, especially as you point out we have a test that does just that without failing 🤔 That said, I think this change is good by itself; leveraging R53's transactional changes sounds like a good move, but I still want to dig into #9732 a bit first. Test runs:
|
Thanks @catsby for the update, I currently don't have much time to test this, but maybe the way IDs are build https://github.com/johanneswuerbach/terraform/blob/ef0196f75477896504e91426c3912feaeefa9eff/builtin/providers/aws/resource_aws_route53_record.go#L391-L396 is the issue? Shouldn't the zone & name be enough to identify a record, especially as the same zone can't have the same name multiple times? |
Going to pull this in, thanks again! |
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'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. |
Utilize the ChangeResourceRecordSets to change the type of a record by
deleting and recreating with a new type.
As change batches are considered transactional changes, Amazon Route 53
either makes all or none of the changes in the batch request ensuring the
update will never be partially applied.
Fixes #9732
There was already an acceptance test for a type change present
terraform/builtin/providers/aws/resource_aws_route53_record_test.go
Line 317 in cb8d7bf