-
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
Importing routes & ACL rules #704
Comments
I am wondering if importing a AWS route (table entry) is even necessary in case it already exists. |
If the aws_route already exists and it was not created by terraform it needs to be impoerted, otherwise apply fails. I tried it with both
and
Plan and failure:
The solution is:
So a workaround exists, but an import would be ideal. |
@vkatsikaros and @AMMullan and @frittentheke This enhancement for |
Enable use of standard import mechanism to import aws_route resources. The enhancement was complicated by AWS not assigning route table routes (aws_route) an ID. However, a route can be uniquely identified with a route table ID and CIDR destination. Thus, creating a pseudo ID defined by r-ROUTETABLEID_CIDRDESTINATION allows routes to be identified and imported. Related hashicorp#5631, #704, hashicorp/terraform#13779
Support for importing |
Could someone provide an example of what the import would look like? I don't understand what the ID should be or where to find it. |
@flickerfly It's the |
@lorengordon, Thanks! |
@YakDriver Should this work if the route table is from a remote state?
|
I don't think it should matter where the route table exists, as long as the import is executed with a provider that has credentials to the account. If your tf config uses multiple providers, pass
But, I haven't yet used the remote state data source, so maybe I'm wrong. 🤷♂️ |
Any update/progress on importing aws_network_acl_rule resources? |
Hi folks 👋 Let's track |
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 @AMMullan as hashicorp/terraform#13779. It was migrated here as part of the provider split. The original body of the issue is below.
I'm trying to import existing infrastructure but am not sure how to import ACL Rules and Routes for AWS.
Terraform Version
v0.8.8
Affected Resource(s)
Would just like to know if you can import these or you just have to apply and force it to overwrite the existing items?
The text was updated successfully, but these errors were encountered: