-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
crash when importing aws_route_table #8225
Comments
I can see how this is possible but unclear what exactly caused it. Do you mind showing me your AWS route table + all routes? (Properties in AWS console are good). |
I feel very strongly that the S3 endpoint is it. I didn't realize that was possible. But I am pretty sure we don't handle that well at all. |
@mitchellh I run into this exact problem when using Terraform v0.7.0 and trying to import a route table that uses s3 endpoints. Here is what my route table looks like:
Link to full crash.log https://gist.github.com/brianbianco/53347e14a07111dd644efe0cdbc19889 Looks like it is bombing out here:
I decided to see what the routes for my route table look like coming out of the golang SDK. These are the routes nested inside of my route table. It could be that the S3 endpoint route uses DestinationPrefixListId instead of DestinationCidrBlock, since it looks like the routeHashID function specifically calls on hashcode.String(*r.DestinationCidrBlock), and then that would likely result in the nil pointer dereference.
|
The error is coming from
does not have a
|
@catsby Right that's what I was saying in my previous comment. The routeHashID function looks for DestinationCidrBlock but there isn't one. I tried changing the code to simply use DestinationPrefixListId if CidrBlock doesn't exist. It looked like this
The import gets further but still ends up failing with the following:
I was in the process of trying to track down how imports work exactly to see if somehow its local state was calculating it's ID with a different function? |
@catsby Sorry to be clear, that route doesn't have a destination cidr block because it is a route for an s3 vpc endpoint. It isn't supposed to have one, but is still a valid route. |
@catsby If you are viewing the issues in email, I have edited and updated my comments a bunch which may not be coming through in email updates. |
@brianbianco understood, thanks! We appreciate all the info, we'll dig in 😄 |
@catsby is there any update on the status of import issues related to route tables? |
I've also just had this crash with version 0.7.4. |
Hi I've also just had this issue - same with 0.7.4 and 0.7.5 - also includes a VPC endpoint |
Same in 0.7.8-dev. |
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. |
Terraform v0.7.0 crashes when i try to import aws_route_table resource:
terraform import aws_route_table.private <my_route_table_id>
crash.log:
https://gist.github.com/drscre/1b7994cadb588924ce627b2487e985a9
The text was updated successfully, but these errors were encountered: