Skip to content

Commit

Permalink
Merge pull request #27784 from kamilturek/b-aws-sesv2-email-identity-…
Browse files Browse the repository at this point in the history
…feedback-attributes-resource-id

r/aws_sesv2_email_identity_feedback_attributes: use the correct attribute as the resource ID in error messages
  • Loading branch information
jar-b authored Nov 14, 2022
2 parents 90449c7 + 83d2817 commit 5e23747
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/27784.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_sesv2_email_identity_feedback_attributes: Fix invalid resource ID in error messages when creating the resource
```
4 changes: 2 additions & 2 deletions internal/service/sesv2/email_identity_feedback_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ func resourceEmailIdentityFeedbackAttributesCreate(ctx context.Context, d *schem

out, err := conn.PutEmailIdentityFeedbackAttributes(ctx, in)
if err != nil {
return create.DiagError(names.SESV2, create.ErrActionCreating, ResNameEmailIdentityFeedbackAttributes, d.Get("name").(string), err)
return create.DiagError(names.SESV2, create.ErrActionCreating, ResNameEmailIdentityFeedbackAttributes, d.Get("email_identity").(string), err)
}

if out == nil {
return create.DiagError(names.SESV2, create.ErrActionCreating, ResNameEmailIdentityFeedbackAttributes, d.Get("name").(string), errors.New("empty output"))
return create.DiagError(names.SESV2, create.ErrActionCreating, ResNameEmailIdentityFeedbackAttributes, d.Get("email_identity").(string), errors.New("empty output"))
}

d.SetId(d.Get("email_identity").(string))
Expand Down

0 comments on commit 5e23747

Please sign in to comment.