provider/aws: Clean up externally removed Launch Configurations
Handle Launch Configurations that are not found more gracefully, but tolerating an additional API error indicating the LC no longer exists.
This commit is contained in:
parent
90c3e06628
commit
b720387449
|
@ -480,7 +480,8 @@ func resourceAwsLaunchConfigurationDelete(d *schema.ResourceData, meta interface
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
autoscalingerr, ok := err.(awserr.Error)
|
autoscalingerr, ok := err.(awserr.Error)
|
||||||
if ok && autoscalingerr.Code() == "InvalidConfiguration.NotFound" {
|
if ok && (autoscalingerr.Code() == "InvalidConfiguration.NotFound" || autoscalingerr.Code() == "ValidationError") {
|
||||||
|
log.Printf("[DEBUG] Launch configuration (%s) not found", d.Id())
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue