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

Route53 records with aliases to the same zone constantly updated (0.7.5) #9363

Closed
robkinyon opened this issue Oct 14, 2016 · 4 comments
Closed

Comments

@robkinyon
Copy link

When using a aws_route53_record that has an alias to another record in the same zone, the alias section is updated on zero change.

Terraform Version

0.7.5

Affected Resource(s)

  • aws_route53_record

Terraform Configuration Files

resource "aws_route53_record" "foo-bar-com" {
  zone_id = "${aws_route53_zone.bar-com.zone_id}"
  name = "foo.bar.com."
  type = "A"

  alias {
    name = "other.bar.com."
    zone_id = "${aws_route53_zone.bar-com.zone_id}"
    evaluate_target_health = false
  }

  depends_on = [
    "aws_route53_record.other-bar-com",
  ]
}

Expected Behavior

When running terraform plan on zero change to this record, Terraform should not report any changes to this record.

Actual Behavior

~ aws_route53_record.foo-bar-com
    alias.1936666417.evaluate_target_health: "" => "false"
    alias.1936666417.name:                   "" => "other.bar.com."
    alias.1936666417.zone_id:                "" => "Z00A0A00A000AA"
    alias.3384870725.evaluate_target_health: "false" => "false"
    alias.3384870725.name:                   "other.bar.com" => ""
    alias.3384870725.zone_id:                "Z00A0A00A000AA" => ""

(I obviously modified the zone ID)

Steps to Reproduce

  1. terraform plan
@apparentlymart
Copy link
Contributor

Hi! Sorry for the issue here.

I think this is a diff normalization issue. It looks like when we read the alias back from the Route53 API it is trimming off the trailing period in your config.

We should fix this by having Terraform mirror this normalization behavior, but in the mean time you should be able to work around it by removing there period from your config so Terraform won't see it as a change.

@kwilczynski
Copy link
Contributor

@robkinyon @apparentlymart there is work started to resolve this issue in the #8517. I apologise for the delay with this.

@apparentlymart
Copy link
Contributor

Great, @kwilczynski! In that case, I'm going close this to consolidate the discussion in #8511.

Please let me know if this other issue doesn't seem to actually be a duplicate of yours, @robkinyon.

@ghost
Copy link

ghost commented Apr 21, 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 21, 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