Per the documentation, DisassociateSecurityGroupVpc is an async operation, and the caller is advised to check the status of the disassociation by DescribeSecurityGroupVpcAssociations.
Most similar operations offer a "waiter" in the related service package. I expected to find something like NewSecurityGroupDisassociationWaiter in the service/ec2 but I couldn't find anything.
Use Case
I am attempting to programmatically write code to clean up unused Security Groups. As a part of this, I need to disassociate any VPCs from the Security Group (this is a documented requirement of DeleteSecurityGroup).
As the disassociation is asynchronous, I assume I need to wait for the disassociation to complete before moving forward with the security-group deletion (but I have not tested this).
Proposed Solution
Introduce NewSecurityGroupDisassociationWaiter, similar to other waiters in the SDK.
Other Information
No response
Acknowledgements
[ ] I may be able to implement this feature request
(I'm not currently using security groups associated with additional VPCs, so this isn't a high-priority for me - I was looking to address this in my own code for completeness.)
Describe the feature
Per the documentation, DisassociateSecurityGroupVpc is an async operation, and the caller is advised to check the status of the disassociation by DescribeSecurityGroupVpcAssociations.
Most similar operations offer a "waiter" in the related service package. I expected to find something like
NewSecurityGroupDisassociationWaiter
in theservice/ec2
but I couldn't find anything.Use Case
I am attempting to programmatically write code to clean up unused Security Groups. As a part of this, I need to disassociate any VPCs from the Security Group (this is a documented requirement of DeleteSecurityGroup).
As the disassociation is asynchronous, I assume I need to wait for the disassociation to complete before moving forward with the security-group deletion (but I have not tested this).
Proposed Solution
Introduce
NewSecurityGroupDisassociationWaiter
, similar to other waiters in the SDK.Other Information
No response
Acknowledgements
AWS Go SDK V2 Module Versions Used
Go version used
go version go1.23.3 linux/amd64