diff --git a/.changelog/27784.txt b/.changelog/27784.txt new file mode 100644 index 00000000000..a6007c17b15 --- /dev/null +++ b/.changelog/27784.txt @@ -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 +``` diff --git a/internal/service/sesv2/email_identity_feedback_attributes.go b/internal/service/sesv2/email_identity_feedback_attributes.go index e218bff9c3d..e7b1aa4b176 100644 --- a/internal/service/sesv2/email_identity_feedback_attributes.go +++ b/internal/service/sesv2/email_identity_feedback_attributes.go @@ -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))