Skip to content

Commit

Permalink
Add warn log
Browse files Browse the repository at this point in the history
  • Loading branch information
teraken0509 committed Jan 9, 2019
1 parent dae5449 commit 252139f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aws/resource_aws_iam_user_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package aws

import (
"fmt"
"log"
"net/url"
"strings"

Expand Down Expand Up @@ -101,6 +102,7 @@ func resourceAwsIamUserPolicyRead(d *schema.ResourceData, meta interface{}) erro
getResp, err := iamconn.GetUserPolicy(request)
if err != nil {
if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") {
log.Printf("[WARN] IAM User Policy (%s) for %s not found, removing from state", name, user)
d.SetId("")
return nil
}
Expand Down

0 comments on commit 252139f

Please sign in to comment.