provider/aws: Expect exception on deletion of APIG Usage Plan Key (#14958)
This commit is contained in:
parent
12aa4bd56e
commit
bc314ca8a0
|
@ -102,10 +102,12 @@ func resourceAwsApiGatewayUsagePlanKeyDelete(d *schema.ResourceData, meta interf
|
|||
UsagePlanId: aws.String(d.Get("usage_plan_id").(string)),
|
||||
KeyId: aws.String(d.Get("key_id").(string)),
|
||||
})
|
||||
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFoundException" {
|
||||
return nil
|
||||
}
|
||||
|
||||
return resource.NonRetryableError(err)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue