Skip to content
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 with uppercase letters not written to state file #3246

Closed
alexintel opened this issue Sep 15, 2015 · 6 comments
Closed

aws_route53_record with uppercase letters not written to state file #3246

alexintel opened this issue Sep 15, 2015 · 6 comments

Comments

@alexintel
Copy link

Regression for v. 0.6.3 compared to v. 0.5.3
aws_route53_record resource is not being written to terraform.tfstate file. Probably a root cause for #3168 and #3159

I hope that's an easy fix to squash all 3 bugs. I probably should have looked deeper into terraform.tfstate file before reporting symptoms in two other bugs.

@apparentlymart
Copy link
Contributor

I've seen this specific issue occur (not being written to state file) when the name contains uppercase letters. Route53 normalizes these to lowercase in its responses, so when Terraform scans for the record in the describe response it doesn't match and it thinks the record has been deleted.

By any chance does your record name contain uppercase letters, or any other sort of thing that the DNS system might normalize away?

@alexintel
Copy link
Author

Yes, in fact DNS entry in my case contains UPPER case characters. I use a randomized stack name something like 123aBc (can be upper or lower case letters) in order to identify resources belonging to the same stack. I propagate that randomized name through the resources including instance names, elb names, route53 entries, and etc.

However, this is still a regression compared to 0.5.3 and in my opinion should not happen.

If terraform does not record all created resources regardless of normalization it's doing internally we'll have a problem with unaccounted infrastructure items left behind.

I just re-run terraform and can confirm that UPPER case characters in aws_route53_record resource indeed cause this issue. Using lower case characters also resolves #3159 and #3168

Thanks for the hint @apparentlymart

@apparentlymart
Copy link
Contributor

Yeah, it's definitely a bug that Terraform doesn't normalize this. At work we've had submitting a patch for this on the todo list for a while, but it didn't reach the top yet.

If someone else would like to attack it in the mean time, I expect the solution will be something similar to what I did in #3120. Otherwise I expect we'll get to it in a little while as we're getting set up to use Terraform with Route53 to manage some of our DNS zones.

@reppard
Copy link

reppard commented Oct 7, 2015

seeing this issue as well. we use 'app_name' or 'project' variables that sometimes contain uppercase characters. normalizing the input would be great.

@apparentlymart apparentlymart changed the title resource aws_route53_record not being written to a state file aws_route53_record with uppercase letters not written to a state file Oct 8, 2015
@apparentlymart apparentlymart changed the title aws_route53_record with uppercase letters not written to a state file aws_route53_record with uppercase letters not written to state file Oct 8, 2015
@catsby
Copy link
Contributor

catsby commented Nov 13, 2015

Hey all – sorry for the silence here. I believe this issue was fixed in #3574 , so I'm going to close this. If you feel this is incorrect please let me know and if possible supply an example config that demonstrates this, so that I can dig in further. Thanks!

@catsby catsby closed this as completed Nov 13, 2015
@ghost
Copy link

ghost commented Apr 30, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants