From 5482e989277049008f094ad9ff76526730e1c4eb Mon Sep 17 00:00:00 2001 From: clint shryock Date: Wed, 18 Nov 2015 13:48:46 -0600 Subject: [PATCH] Fix typo in error checking for IAM Policy Attachments --- builtin/providers/aws/resource_aws_iam_policy_attachment.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_iam_policy_attachment.go b/builtin/providers/aws/resource_aws_iam_policy_attachment.go index 5682840d4..bccf2e775 100644 --- a/builtin/providers/aws/resource_aws_iam_policy_attachment.go +++ b/builtin/providers/aws/resource_aws_iam_policy_attachment.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "log" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -90,7 +91,8 @@ func resourceAwsIamPolicyAttachmentRead(d *schema.ResourceData, meta interface{} if err != nil { if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() == "NoSuchIdentity" { + if awsErr.Code() == "NoSuchEntity" { + log.Printf("[WARN] No such entity found for Policy Attachment (%s)", d.Id()) d.SetId("") return nil }