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

resourceAwsRouteExists throws error instead of returning false #9421

Closed
idris opened this issue Oct 17, 2016 · 2 comments
Closed

resourceAwsRouteExists throws error instead of returning false #9421

idris opened this issue Oct 17, 2016 · 2 comments

Comments

@idris
Copy link

idris commented Oct 17, 2016

While doing a terraform refresh (or terraform plan or terraform destroy), I get the error in Output below.

It seems like rather than hitting the return false, fmt.Errorf("Error while checking if route exists: %s", err) branch, it should return false, nil like the lines below it.

I think this is do-able by just checking the error code against InvalidRouteTableID.NotFound, like is done elsewhere in the file.

Terraform Version

Terraform v0.7.6

Affected Resource(s)

Please list the resources as a list, for example:

  • route
  • route table

Output

Error refreshing state: 5 error(s) occurred:

* aws_route.external: Error while checking if route exists: InvalidRouteTableID.NotFound: The routeTable ID 'rtb-2e1a8148' does not exist
    status code: 400, request id: f8a4788e-1981-4dca-ae32-f72bc89ba841
* aws_route.internal.0: Error while checking if route exists: InvalidRouteTableID.NotFound: The routeTable ID 'rtb-2c1a814a' does not exist
    status code: 400, request id: f1e1ad14-12cd-46db-84ef-7d24fa604d6e
* aws_route.internal.3: Error while checking if route exists: InvalidRouteTableID.NotFound: The routeTable ID 'rtb-2f1a8149' does not exist
    status code: 400, request id: cb9b5cd6-264b-430f-93f2-11d78a0822a7
* aws_route.internal.1: Error while checking if route exists: InvalidRouteTableID.NotFound: The routeTable ID 'rtb-2d1a814b' does not exist
    status code: 400, request id: feb5818d-478c-487b-940f-33a4f6772605
* aws_route.internal.2: Error while checking if route exists: InvalidRouteTableID.NotFound: The routeTable ID 'rtb-2b1a814d' does not exist
    status code: 400, request id: a94621d1-391c-4b34-b7ad-2741bb030cee

Expected Behavior

Terraform should recognize that the route table is gone.

Actual Behavior

Terraform refresh fails due to the error.

References

Seems similar to:

@kwilczynski
Copy link
Contributor

@idris hi there! I am sorry that you are having issues.

I believe, I was able to address this issue in #9431. Hopefully this will resolve the issue for you.

@jbardin jbardin closed this as completed Oct 19, 2016
@ghost
Copy link

ghost commented Apr 21, 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 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants