-
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: Fix issue with Route53 and zero weighted records #4427
Conversation
Totally a sentinel value! This LGTM - recommend updating the docs to with a similar note about the default and its meaning. |
default in Terraform. This allows Terraform to distinquish between a `0` value | ||
and an empty value in the configuration (none specified). As a result, a | ||
`weight` of `-1` will be present in the statefile if `weight` is omitted in the | ||
configuraiton. |
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.
s/configuraiton/configuration/
One typo to fix and this looks good to go. |
provider/aws: Fix issue with Route53 and zero weighted records
@scalp42 for Did you see different behavior here? |
I saw We had the same issue with SGs where Terraform was deleting/re-creating rules with no changes (causing havoc again), so I'm assuming it's the same case. |
Hm that's definitely not expected. Did the plan have a If you file a fresh issue with all the information you have, we can to dig in further to figure out what happened. |
@phinze Unfortunately I don't have the output anymore 🍶 Thanks for the feedback though. |
Ah dang, too bad. Anytime you catch unexpected behavior definitely follow up with a fresh issue and we can help you run it down. 👍 |
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. |
Route 53 allows weighted records, with a weight of
0
meaning various things depending on the context.Terraform's internal can sometimes confuse
0
for "not specified", which is incorrect in this case. As a result, a0
weight was not possible... UNTIL NOW!Here we default the weight to
-1
as a sentinel value*. A record uses this default when the user does not specifyweight
in the record. A weight of-1
is ignored.*probably not a true sentinel value