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

Terraform modified root domain that wasn't managed by terraform instead of throwing an error #7920

Closed
Defozo opened this issue Mar 13, 2019 · 2 comments
Labels
service/route53 Issues and PRs that pertain to the route53 service.
Milestone

Comments

@Defozo
Copy link

Defozo commented Mar 13, 2019

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.13

  • provider.aws v1.49.0
  • provider.null v2.0.0
  • provider.template v2.0.0

Affected Resource(s)

  • aws_route53_record

Terraform Configuration Files

data "aws_route53_zone" "example_com" {
  name = "example.com."
}

data "aws_elastic_beanstalk_hosted_zone" "current" {}

resource "aws_route53_record" "default" {
  zone_id = "${data.aws_route53_zone.example_com.zone_id}"
  name    = ""
  type    = "A"

  alias {
    name                   = "something.beanstalk.com"
    zone_id                = "${data.aws_elastic_beanstalk_hosted_zone.current.id}"
    evaluate_target_health = false
  }
}

Expected Behavior

Terraform should show an error that hostname (aws_route53_record.default.name) can't be empty or that example.com record already exists.

Actual Behavior

Terraform modified example.com.

Steps to Reproduce

  1. Use the above snippet.
  2. Execute terraform apply.
  3. Now, your root domain should point to the provided alias name.
@Defozo Defozo changed the title Terraform modified root domain instead of resulting in error Terraform modified root domain that wasn't managed by terraform instead of resulting in error Mar 13, 2019
@Defozo Defozo changed the title Terraform modified root domain that wasn't managed by terraform instead of resulting in error Terraform modified root domain that wasn't managed by terraform instead throwing an error Mar 13, 2019
@Defozo Defozo changed the title Terraform modified root domain that wasn't managed by terraform instead throwing an error Terraform modified root domain that wasn't managed by terraform instead of throwing an error Mar 13, 2019
@bflad bflad added the service/route53 Issues and PRs that pertain to the route53 service. label Mar 13, 2019
@bflad
Copy link
Contributor

bflad commented Mar 13, 2019

Hi @Defozo 👋 Sorry you ran into this unexpected behavior here. The default behavior for the aws_route53_record resource was updated in version 2.0.0 of the Terraform AWS Provider to require a special flag to overwrite existing records:

Since this issue should already be resolved by default when using an updated version of the Terraform AWS Provider, I'm going to close this issue, but please reach out if the updated behavior has problems.

@bflad bflad closed this as completed Mar 13, 2019
@bflad bflad added this to the v2.0.0 milestone Mar 13, 2019
@ghost
Copy link

ghost commented Mar 31, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/route53 Issues and PRs that pertain to the route53 service.
Projects
None yet
Development

No branches or pull requests

2 participants