Closed kai-66degrees closed 2 years ago
Since the aws_customer_gateway
resource creation is happening outside of this module, you can do it easily.
But i agree it would make sense to extend the examples with the lifecycle attribute, and a comment why it's necessary.
i've changed one of the examples with the following, and worked as expected:
resource "aws_customer_gateway" "main" {
bgp_asn = 65000
ip_address = "172.83.124.15"
type = "ipsec.1"
tags = {
Name = "complete-vpn-gateway"
}
lifecycle {
create_before_destroy = true
}
}
This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days
This issue was automatically closed because of stale in 10 days
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.
Description
When you try to change the IP for a customer gateway resource, following error is encountered:
Error: error deleting EC2 Customer Gateway (cgw-abcde): IncorrectState: The customer gateway is in use. status code: 400, request id: 1234xyz
I think adding a create_before_destroy to the customer gateway resource should fix it.