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

Deleting aws_route_internet_access in AWS breaks planning #5288

Closed
danosipov opened this issue Feb 23, 2016 · 6 comments · Fixed by #8443
Closed

Deleting aws_route_internet_access in AWS breaks planning #5288

danosipov opened this issue Feb 23, 2016 · 6 comments · Fixed by #8443

Comments

@danosipov
Copy link

I had to delete the VPC in AWS, which deleted all related subnets & routes. Rerunning terraform yields an error

$> terraform plan
...
aws_route.internet_access: Refreshing state... (ID: r-rtb-####)
Error refreshing state: 1 error(s) occurred:

* aws_route.internet_access: InvalidRouteTableID.NotFound: The routeTable ID 'rtb-####' does not exist
    status code: 400, request id:
@stack72
Copy link
Contributor

stack72 commented Feb 24, 2016

Hi @danosipov,

Please can you share the config (minus) secrets that would allow us to try and reproduce this so we can try and track down the error

Thanks

Paul

@danosipov
Copy link
Author

@stack72 I'm going to try to minimize the config, though that may be tricky. I was using the sample from https://github.com/hashicorp/terraform/blob/master/examples/aws-two-tier/main.tf but added route table associations

resource "aws_route_table_association" "first" {
    subnet_id = "${aws_subnet.default.id}"
    route_table_id = "${aws_vpc.druid.main_route_table_id}"
}
resource "aws_route_table_association" "second" {
    subnet_id = "${aws_subnet.db.id}"
    route_table_id = "${aws_vpc.druid.main_route_table_id}"
}

These caused the problem upon manual deletion of the VPC from AWS. I've had to remove the corresponding entries from terraform.tfstate to get it to run again.

@stack72
Copy link
Contributor

stack72 commented Feb 25, 2016

Ok, if I am reading this correct, then the order of your operations are are follows:

  1. Create the setup using Terraform
  2. Delete the VPC from the AWS console
  3. Try and re-apply the configuration using Terraform?

@danosipov
Copy link
Author

@stack72 Yes, thats how I encountered the issue.

@guiocavalcanti
Copy link

@stack72 I have the same error using 0.7.1. Here you can see part of my logs. At first I thought it was a tack problem and opened an issue (kz8s/tack#45) there.

@ghost
Copy link

ghost commented Apr 22, 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 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.

@ghost ghost locked and limited conversation to collaborators Apr 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants