-
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
Allow import of aws_route_table_association #561
Comments
In fact, when you import route table, it will import all route table associations together, but the name of
It should be:
|
Has anyone managed to bypass this even manually? I'm migrating CloudFormation to Terraform and I'm stuck at importing aws_route_table_association. Any guidance would be useful. Thanks |
@apanagiotou Yes, I have worked around it by using "terraform state mv". For example, in the above post where it mentions that it automatically imports the wrong names, you can fix that by running:
(or possibly |
Just to clarify, the square brackets do work as mentioned at the end of @pib 's comment. Not sure if the dot notation he has works as well, but the following is (almost) exactly what I used:
|
Also in need of this to migrate from cloudformation to terraform! |
For route table associations that weren't automatically imported correctly or incorrectly, pull your state file for manual editing:
Then edit
Make sure you've still got valid JSON with all the commas, then push the state file back:
|
Best way is to define it in a resource block with the right arguments, |
@dimisjim Yes I think that's the intended behavior, but I ended up with a brief outage when I tried that approach, since it removed the association and then re-created it. User error perhaps, but that's the behavior I get with that approach. |
If I attempt to apply my aws_route_table_association that I can't import, then I get the following error:
|
Support for importing |
This has been released in version 2.22.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 for triage. Thanks! |
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 @GuiSim as hashicorp/terraform#12280. It was migrated here as part of the provider split. The original body of the issue is below.
Terraform Version
v0.8.7
Affected Resource(s)
Currently if you run
terraform import
on aaws_route_table_association
you'll get an error:Allowing route table associations to be imported would be really useful. Right now, I can do it by manually editing the state file but it is an error prone process.
You can get the
id
of a route table association throughThey follow the format
rtbassoc-XXXXX
.Thanks!
The text was updated successfully, but these errors were encountered: