From dde11ed3fec5f47aa72264133f03d983456a8f96 Mon Sep 17 00:00:00 2001 From: Kamil Turek Date: Mon, 14 Nov 2022 00:06:39 +0100 Subject: [PATCH 1/2] Use the correct attribute as the resource ID in error messages --- internal/service/sesv2/email_identity_feedback_attributes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)) From 83d2817f2ef9cb5224234e0711b1009af02d76e3 Mon Sep 17 00:00:00 2001 From: Kamil Turek Date: Mon, 14 Nov 2022 09:02:23 +0100 Subject: [PATCH 2/2] Add a changelog entry --- .changelog/27784.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/27784.txt 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 +```