You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Terraform does not re-create a deleted AWS customer gateway (CGW). If I create a CGW with Terraform, then delete it out-of-band of Terraform (via CLI or the AWS console), Terraform will fail with a Error finding CustomerGateway error on the next refresh, plan, or apply, rather than re-creating the CGW.
Repeat previous step until the CGW is no longer present. Note: It will stay in deleted state for 30 minutes or more. To reproduce, you must wait until after the CGW is no longer present in the response.
terraform apply
Observe Terraform fail with an error.
Output
$ terraform plan
Refreshing Terraform state prior to plan...
aws_customer_gateway.main: Refreshing state... (ID: cgw-48cb2521)
Error refreshing state: 1 error(s) occurred:
* aws_customer_gateway.main: [ERROR] Error finding CustomerGateway: cgw-48cb2521
$
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
locked and limited conversation to collaborators
Apr 24, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Terraform does not re-create a deleted AWS customer gateway (CGW). If I create a CGW with Terraform, then delete it out-of-band of Terraform (via CLI or the AWS console), Terraform will fail with a Error finding CustomerGateway error on the next refresh, plan, or apply, rather than re-creating the CGW.
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Terraform should recognize that the CGW has been deleted and re-create it if still present in my configuration.
Actual Behavior
Terraform fails to refresh, plan, or apply with a Error finding CustomerGateway error.
Steps to Reproduce
terraform apply
aws ec2 describe-customer-gateways --customer-gateway-id $(terraform output cgw_id)
aws ec2 delete-customer-gateway --customer-gateway-id $(terraform output cgw_id)
aws ec2 describe-customer-gateways --customer-gateway-id $(terraform output cgw_id)
deleted
state for 30 minutes or more. To reproduce, you must wait until after the CGW is no longer present in the response.terraform apply
Output
References
The text was updated successfully, but these errors were encountered: