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

Name update of aws_vpn_connection_route resource caused unwanted effects #4341

Closed
jwadolowski opened this issue Dec 16, 2015 · 1 comment
Closed

Comments

@jwadolowski
Copy link

Hey,

I've just renamed 2 aws_vpn_connection_route resources (all arguments stayed the same) and applied the changes, but it turned out my static routes ended in deleted state.

This is how plan looked like:

+ aws_vpn_connection_route.cognifide-office-int-route
    destination_cidr_block: "" => "192.168.0.0/16"
    vpn_connection_id:      "" => "vpn-48bdca03"

- aws_vpn_connection_route.cognifide-office-route

+ aws_vpn_connection_route.cognifide-vpn-int-route
    destination_cidr_block: "" => "10.214.0.0/16"
    vpn_connection_id:      "" => "vpn-48bdca03"

- aws_vpn_connection_route.cognifide-vpn-route

and this was the output of terraform apply command:

aws_vpn_connection_route.cognifide-office-route: Destroying...
aws_vpn_connection_route.cognifide-vpn-route: Destroying...
aws_vpn_connection_route.cognifide-office-int-route: Creating...
  destination_cidr_block: "" => "192.168.0.0/16"
  vpn_connection_id:      "" => "vpn-48bdca03"
aws_vpn_connection_route.cognifide-vpn-int-route: Creating...
  destination_cidr_block: "" => "10.214.0.0/16"
  vpn_connection_id:      "" => "vpn-48bdca03"
aws_vpn_connection_route.cognifide-office-route: Destruction complete
aws_vpn_connection_route.cognifide-vpn-route: Destruction complete
aws_vpn_connection_route.cognifide-vpn-int-route: Creation complete
aws_vpn_connection_route.cognifide-office-int-route: Creation complete

Apply complete! Resources: 2 added, 0 changed, 2 destroyed.

The state of your infrastructure has been saved to the path
below. This state is required to modify and destroy your
infrastructure, so keep it safe. To inspect the complete state
use the `terraform show` command.

State path: .terraform/terraform.tfstate

Immediately after this change I lost connectivity to my EC2 machines. Once I logged in to AWS control panel I saw both routes were in deleted state. After manual change connectivity was restored.

This is the place I've seen these deleted states (unfortunately didn't take screenshot of that):
aws_vpn_connection_route_20151216

@ghost
Copy link

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

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

No branches or pull requests

3 participants