-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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_zone imports with a trailing dot #241
Comments
Hi, do we have any update on this? |
@Godfried Look at corresponding pull request hashicorp/terraform#8517: it's a WIP & not migrated to this repository, yet. |
I ran into the same issue. According to hasicorp/terraform#8517 a solution is to remove the trailing dot from the state file directly. |
Hitting the same thing here. I created an
I then remove that resource from my state and reimport it with a dot...
And even though the import's successful, subsequent
It'd be nice if this could be fixed, because it makes me wonder what'll happen if I import a bunch of existing records with or without the trailing dots and whether it'll cause me any problems down the line. Terraform version: v0.10.2 |
This has been released in version 1.10.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
Reopening this issue as it appears this issue was errantly closed by #3321 which fixed the behavior for |
Related to hashicorp/terraform-provider-aws#241 With different terraform versions, zone.name will have a trailing dot, or not.
also running into this issue with ACM.
|
Workaround in the meantime, search for trailing "." with regex and replace
|
This issue also appears for aws_cloudfront_distribution, for origin -> domain_name, the terraform apply errors out when trying to create the resource as it doesn't consider it to be a valid domain_name. @clarlam workaround fixes the issue for now.
|
Yep. Still an issue. Another part of the problem is that this is changed upon apply, but the plan doesn't respect that it has a change. |
I've not actually worked with Go before, so this might be a bit silly, but... The schema for If so: does that mean the bug lies with If not: does that mean that the fix for this is to just do what was done in #3321? i.e stick If it's the latter, I'm happy to stick my toe into the water as this seems like a relatively easy fix, but if it's the former that sounds to me like a bigger issue :/ |
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! |
This issue was originally opened by @TaiSHiNet as hashicorp/terraform#8511. It was migrated here as part of the provider split. The original body of the issue is below.
Hi,
I'm on version 0.7.1 and when running an aws_route_53 import it'll end up in the state file with a trailing dot (as in bind, and as shown in the console).
This causes the resource to try and be recreated due to a mismatch with the terraform file.
How to reproduce:
Create a Route53 zone manually
Create the TF resource in a file
Import Route53 zone into your state
Run terraform plan
I could have just bypassed this by by adding a trailing dot to the resource, but documentation shows an example without it and it might be misleading to have both ways.
Bests
The text was updated successfully, but these errors were encountered: