-
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
aws/route53: Add support for updating records #1122
Comments
The "update all the time" behaviour only happens when using the shorter syntax introduced in #312 or #969 respectively. It actually does work well with the "verbose" syntax (with FQDN): resource "aws_route53_zone" "primary" {
name = "radeksimko.com"
}
resource "aws_route53_record" "sample" {
zone_id = "${aws_route53_zone.primary.id}"
name = "sample.${aws_route53_zone.primary.name}"
type = "CNAME"
ttl = "30"
records = ["www.terraform.io"]
} |
^ That said, the original issue title is still valid, because proper Update functionality should be there. Changing things like |
Hey @radeksimko – unless I'm reading the docs incorrectly (which is always possible 😄 ), Route 53 doesn't have a distinct
sadly yes, though I'm looking into that now |
I don't think so, as the name suggests, it's UPSERT = Update or Insert, nothing like DELETE should be happening there. That said, yes, you're going to use the same action name for both create & update, but different data will be passed into that API request, so that we can efficiently update things that can be updated and don't have to be recreated again ( Destroy & Create takes much more time and I don't really see the reason for waiting (not even mentioning the possibility of downtime due to radical DNS changes). |
According to the documentation I linked to, and I admit maybe I'm misinterpreting it, Route 53's definition of
For what it's worth, I agree with your definition 😄 The more detailed API reference expands some more:
Unfortunately, we aren't yet setting any of those mentioned, beyond I agree that a genuine @phinze has a theory: that we could remove any appropriate If you have time, I would welcome your feedback on #1279, which I believe addresses the "update all the time" issue I introduced. Thanks! |
It still means you'll be sending two API requests and waiting for the
I will have a look. |
TL;DR what I'm trying to say here is that the current update solution does the job but it's way too expensive in terms of API calls & time spent on waiting and the risk introduced by each such change. Compare the risk of 1 "atomic" API call VS destroying something and then hoping that nothing goes wrong before you start creating it again. |
I've submitted #1396 to address this |
I just merged #1396. It adds a resource update function that simply falls through to the If you're ok with #1396 and satisfied, we'll close this one. |
@catsby Thanks for pinging me. The basic update works, but here's an example which demonstrates an issue:
ORIGINAL:
Modified version:
Reality after
Which leads me to a conclusion, that |
I think it means always DELETE too: |
@catsby Part of this issue seems to be fixed. 👍 Is it just a coincidence or destroy events now always go before create events? If yes, I think we can close this issue and create a new one just for the issue w/ |
That said, a simple acceptance test that would be changing |
see #1795 |
regarding this issue, I believe 32eebf4e fixed an issue where we were not tolerating Closing this issue, let me know if there is anything else. |
It still fails to update an
|
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. |
aws_route53_record
currently doesn't support update and simply tries to destroy & create all records per eachterraform apply
(= it doesn't even detect if there's any change):It's worth mentioning that there are certain limits on the API:
http://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html
which we may not want to care about for the initial implementation, but should keep that in mind for the future and have some mechanisms how to get around that and eventually send more requests if required.
The text was updated successfully, but these errors were encountered: