diff --git a/aws/resource_aws_iam_user_policy.go b/aws/resource_aws_iam_user_policy.go index cd236b67ad7..6495bc679ee 100644 --- a/aws/resource_aws_iam_user_policy.go +++ b/aws/resource_aws_iam_user_policy.go @@ -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)