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

provider/aws: Downcase Route 53 record names in statefile #3574

Merged
merged 2 commits into from
Nov 10, 2015

Conversation

catsby
Copy link
Contributor

@catsby catsby commented Oct 20, 2015

Route 53 apparently down cases any record name you send it, though this is not documented anywhere I could find.

Currently, if you supply a mixed case name like so:

resource "aws_route53_record" "other" {
    zone_id = "${aws_route53_zone.primary.id}"
    name = "TesTing"
    type = "A"
    ttl = "30"
    records = ["127.0.0.3"]
}

The record will be created, but with a lower case name testing and not TesTing. The resource compares the names as is, so there is no match found.

This PR does 3 things:

  • stores a lowercase version of the Route 53 name in the state
  • uses lowercase for comparison of records from the API
  • updates a test to prevent regressions

Fixes #3564 , and should be backwards compatible safe, because if you have a mixed case name right now, then Terraform is giving you a plan/apply loop.

@phinze
Copy link
Contributor

phinze commented Nov 10, 2015

LGTM

catsby added a commit that referenced this pull request Nov 10, 2015
provider/aws: Downcase Route 53 record names in statefile
@catsby catsby merged commit dbc008e into master Nov 10, 2015
@catsby catsby deleted the b-aws-r53-name-fix branch November 10, 2015 22:44
@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

Successfully merging this pull request may close these issues.

aws_route53_record resources not working when mixed case is used in name
3 participants