如何删除失败的 VPC 对等连接创建?
在创建 VPC 对等连接时,我提供了一个无效的 VPC id,导致对等连接创建失败。后来我更正了 VPC id 并可以创建对等连接。现在我正在尝试删除失败的对等连接,但该选项在 AWS 仪表板中显示为灰色。
CLI 不允许我删除它。如何删除失败的 VPC 对等连接?
$ aws ec2 delete-vpc-peering-connection --vpc-peering-connection-id pcx-xxxxxxxx
An error occurred (InvalidStateTransition) when calling the DeleteVpcPeeringConnection operation: Invalid state transition for pcx-xxxxxxxx, attempted to transition from failed to deleting
最佳答案
看起来 FAILED 对等连接将对请求者保持 2 天,对接受者保持 2 小时。
参见:VPC Peering Connection Lifecycle
Rejected: The owner of the accepter VPC has rejected a pending-acceptance VPC peering connection request. During this state, the request cannot be accepted. The rejected VPC peering connection remains visible to the owner of the requester VPC for 2 days, and visible to the owner of the accepter VPC for 2 hours. If the request was created within the same AWS account, the rejected request remains visible for 2 hours.
关于amazon-web-services - 如何删除失败的 VPC 对等连接创建?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49804210/