-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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_record keeps wanting to change when passing aws_elb.dns_name #360
Comments
I believe this is worth mentioning: Seems like AWS automatically assigns the elb zone_id and terraform is fighting to change it. Manually configuring zone_id resolves this issue. For example, when seeing this issue
manually set the zone_id.
This isn't ideal, wondering if alias zone_id should be required when assigning it to elb? Or is this an AWS issue not revealing the right zone_id? |
Ours is not fighting with the Zone ID, just recreating all the time:
|
We got a similar issue and it turned out to be the casing was different.
Adding a |
We're seeing this with the ELB name being entirely lowercase, so forcing the ELB name through |
Seeing this as well on version 0.9.10. Investigating further, I have found what is causing this for us. It seems to be an inconsistency in how AWS reports zone id from the EC2 side compared to Route53. In the AWS console, looking at our EC2 load balancer details, they seem to be spread between two different hosted zones. Looking at the corresponding Route53 entries, however, consistently lists just one of these zones as the "Alias Hosted Zone ID". In the cases where they differ, Terraform will try to change them, over and over. |
@rickard-von-essen confirmed, lower() helps. |
@jmehnle your ELB name and tags are also lowercase? |
The uppercase alias name difference issue should be resolved since v1.8.0 of the AWS provider (via #3119). As for any plans showing the zone ID as a difference perpertually, does using the
|
This problem occurs for us too, on our older ELBs. In the AWS web-console the Route53 "Alias Hosted Zone ID" value shows one thing ("Z35SXDOTRQ7X7K") and the ELB "Hosted zone" shows another ("Z3DZXE0Q79N41H"). Terraform constantly tries to "fix" the Route53 record but AWS is always re-writing it back. This is a AWS quirk, I can't really blame terraform.
Relevant reference: hashicorp/terraform#9289 (comment). |
Closing this as the previous two comments should have all the details necessary here. If you are continuing to have some sort of perpetual difference in this regard, please open a new issue with all the details of the issue template. Thanks! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This issue was originally opened by @deanmraz as hashicorp/terraform#10004. It was migrated here as part of the provider split. The original body of the issue is below.
Terraform Version
Confirmed on 0.7.9 and 0.7.10
Affected Resource(s)
Debug Output
Expected Behavior
Not require a change, display message: No changes...
Actual Behavior
Always requires a change. Notice the appending "." in alias.555.name compared to alias.777.name. Applying then running plan will continue this endless loop of this change.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
Important Factoids
References
The text was updated successfully, but these errors were encountered: