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

Dualstack prefix forcibly removed from ALIAS records #6480

Closed
jdubeau123 opened this issue Nov 15, 2018 · 10 comments · Fixed by #10672
Closed

Dualstack prefix forcibly removed from ALIAS records #6480

jdubeau123 opened this issue Nov 15, 2018 · 10 comments · Fixed by #10672
Assignees
Labels
bug Addresses a defect in current functionality. service/route53 Issues and PRs that pertain to the route53 service.
Milestone

Comments

@jdubeau123
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.11.10

  • provider.aws v1.44.0
  • provider.terraform v1.0.2

Affected Resource(s)

  • aws_route53_record

Terraform Configuration Files

resource "aws_route53_record" "big_happy_alias_record" {
  zone_id = "${var.zone_id}"
  name    = "${var.name}"
  type    = "${var.type}"

  alias {
    name                   = "${var.alias_name}"
    zone_id                = "${var.alias_zone_id}"
    evaluate_target_health = "${var.alias_evaluate_target_health}"
  }

  allow_overwrite = "${var.allow_overwrite}"
}

Expected Behavior

I imported an existing DNS record into terraform, which was an ALIAS record that contained a "dualstack" prefix in its alias target. I then ran a trivial apply operation on the resource to change the "allow_overwrite" value to false. This should not have silently changed the ALIAS target in the record.

Actual Behavior

The initial import worked fine, but when I run any apply whatsoever on the resource it ends up silently stripping off the "dualstack" prefix without saying anything in the plan.

Steps to Reproduce

  1. terraform apply with any changes after importing an ALIAS record whose target has a dualstack prefix

Important Factoids

I think I narrowed down why this is happening. I inspected the debug output and found that the prefix did indeed seem to be stripped off halfway through the apply operation, so I checked the provider code and found this function. I haven't read this in any detail but it appears this would cause any ALIAS record in terraform to have its dualstack prefix stripped off 100% of the time. Can anyone provide any insight into why this would be the desired/appropriate behavior? We actually do want many of our ALIAS records to use dualstack, so this pretty much means the route 53 resources are largely not useful at all in our case.

References

@bflad bflad added the service/route53 Issues and PRs that pertain to the route53 service. label Nov 16, 2018
@paulcdejean
Copy link

So it's just impossible to have a dualstack alias record if you use terraform???

@paulcdejean
Copy link

A perpetual changed loop was "fixed" by just forcing all alias records to non dualstack!

🤦‍♂️

95ce334

@aeschright aeschright added the needs-triage Waiting for first response or review from a maintainer. label Jun 24, 2019
@ngaya-ll
Copy link
Contributor

I'm having a related issue with terraform 0.12.12 / aws provider 2.33. If I create an alias record and then add/remove the dualstack prefix in the terraform configuration, Terraform detects no changes to apply so the record does not get updated.

@aeschright aeschright added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 20, 2019
@alvarolinarescabre
Copy link

Any news about it????????

@nmofonseca
Copy link

I am having the same issue. Is this going to be picked up eventually?

@guilatrova
Copy link

@himalayKondekar
Copy link

himalayKondekar commented Apr 26, 2022

We are facing the same issue.
system info:
Terraform v1.1.9
on darwin_arm64

  • provider registry.terraform.io/hashicorp/aws v4.2.0

When we can expect to be resolved

@YakDriver YakDriver self-assigned this Jul 25, 2022
@github-actions github-actions bot added this to the v4.24.0 milestone Jul 26, 2022
@github-actions
Copy link

github-actions bot commented Aug 3, 2022

This functionality has been released in v4.24.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@jtsoi
Copy link

jtsoi commented Aug 25, 2022

For anyone looking finding this issue post 4.24.0 release:
If you have a state diff due to dualstack.ALB_NAME.*.elb.amazonaws.com -> ALB_NAME.*.elb.amazonaws.com

Here is what I found:

My conclusion is that for recently created VPC dualstack ALBs, the dualstack prefix is redundant and can be omitted.
Apply at your own risk.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/route53 Issues and PRs that pertain to the route53 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.