Security Group resource fails to destroy when a rule references another group or entity that does not exist #20035
Labels
bug
Addresses a defect in current functionality.
service/ec2
Issues and PRs that pertain to the ec2 service.
Milestone
parent ticket: #19932
Problem statement. When a security resource references a resource that does not exist - more specifically if a rule uses a second security group as a source to allow traffic from and that group no longer exists (has been destroyed outside of terraform), a terraform destroy will fail with one of the following errors:
Error: No security group with ID "sg-0c9450f52f3c5e7dc"
Error: Error deleting security group: DependencyViolation: resource sg-02cd8eca8d630233c has a dependent object status 400
Expected behavior - A warning is displayed and the destroy continues to remove the resource as normal.
The text was updated successfully, but these errors were encountered: