Skip to content

Commit

Permalink
resource/aws_iam_user_policy: Use d.IsNewResource() check instead of …
Browse files Browse the repository at this point in the history
…d.Id() value for readability
  • Loading branch information
bflad committed Jan 18, 2018
1 parent 9afae49 commit de40f3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aws/resource_aws_iam_user_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func resourceAwsIamUserPolicyPut(d *schema.ResourceData, meta interface{}) error
}

var policyName string
if d.Id() != "" {
if !d.IsNewResource() {
_, policyName = resourceAwsIamUserPolicyParseId(d.Id())
} else if v, ok := d.GetOk("name"); ok {
policyName = v.(string)
Expand Down

0 comments on commit de40f3e

Please sign in to comment.