Skip to content

Commit aa63ed0

Browse files
committed
Handle errors like "deleting EC2 VPC IPv4 CIDR Block Association (...): operation error EC2: DisassociateVpcCidrBlock, https response error StatusCode: 400, RequestID: ..., api error InvalidVpcID.NotFound: The vpc ID '...' does not exist".
1 parent a2b3550 commit aa63ed0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/service/ec2/vpc_ipv4_cidr_block_association.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func resourceVPCIPv4CIDRBlockAssociationDelete(ctx context.Context, d *schema.Re
163163
}
164164
_, err := conn.DisassociateVpcCidrBlock(ctx, &input)
165165

166-
if tfawserr.ErrCodeEquals(err, errCodeInvalidVPCCIDRBlockAssociationIDNotFound) {
166+
if tfawserr.ErrCodeEquals(err, errCodeInvalidVPCCIDRBlockAssociationIDNotFound, errCodeInvalidVPCIDNotFound) {
167167
return diags
168168
}
169169

0 commit comments

Comments
 (0)