From b720387449969ddf2a8ad64d93060fa1cce2d45f Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Tue, 21 Jul 2015 11:13:41 -0500 Subject: [PATCH] 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. --- builtin/providers/aws/resource_aws_launch_configuration.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_launch_configuration.go b/builtin/providers/aws/resource_aws_launch_configuration.go index ab6350b38..85630aa5a 100644 --- a/builtin/providers/aws/resource_aws_launch_configuration.go +++ b/builtin/providers/aws/resource_aws_launch_configuration.go @@ -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 }