Merge pull request #2806 from hashicorp/b-aws-lc-cleanup

provider/aws: Clean up externally removed Launch Configurations
This commit is contained in:
Clint 2015-07-24 12:00:49 -05:00
commit b75b40553d
1 changed files with 2 additions and 1 deletions

View File

@ -480,7 +480,8 @@ func resourceAwsLaunchConfigurationDelete(d *schema.ResourceData, meta interface
})
if err != nil {
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
}