-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sesv2 data sources for email identity and mail from attributes #32026
Conversation
Community NoteVoting for Prioritization
For Submitters
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
$ make testacc PKG=sesv2 TESTS=TestAccSESV2EmailIdentityDataSource_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sesv2/... -v -count 1 -parallel 20 -run='TestAccSESV2EmailIdentityDataSource_' -timeout 180m
=== RUN TestAccSESV2EmailIdentityDataSource_basic
=== PAUSE TestAccSESV2EmailIdentityDataSource_basic
=== CONT TestAccSESV2EmailIdentityDataSource_basic
--- PASS: TestAccSESV2EmailIdentityDataSource_basic (17.86s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/sesv2 21.028s
$ make testacc PKG=sesv2 TESTS=TestAccSESV2EmailIdentityMailFromAttributesDataSource_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/sesv2/... -v -count 1 -parallel 20 -run='TestAccSESV2EmailIdentityMailFromAttributesDataSource_' -timeout 180m
=== RUN TestAccSESV2EmailIdentityMailFromAttributesDataSource_basic
=== PAUSE TestAccSESV2EmailIdentityMailFromAttributesDataSource_basic
=== CONT TestAccSESV2EmailIdentityMailFromAttributesDataSource_basic
--- PASS: TestAccSESV2EmailIdentityMailFromAttributesDataSource_basic (18.37s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/sesv2 21.583s
Thanks for your contribution, @jchorl! 👍 |
This functionality has been released in v5.5.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
@@ -120,5 +121,5 @@ func dataSourceEmailIdentityRead(ctx context.Context, d *schema.ResourceData, me | |||
d.Set("identity_type", string(out.IdentityType)) | |||
d.Set("verified_for_sending_status", out.VerifiedForSendingStatus) | |||
|
|||
return nil | |||
return diags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my edification, why is this commit necessary? Do folks add diagnostics in non-error cases? Is this just setting up for a future where we may add diagnostics all throughout this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latter - future-proofing for cases where we might add non-error diagnostics. The newer Plugin-Framework uses this diagnostics pattern, so we try to make Plugin-SDK based resources look similar.
There are a bunch of legacy Plugin-SDK based resources that don't look this way, but when new stuff comes in its a simple enough change we usually switch over.
I think this was my first aws tf contribution, so thanks a bunch for cleaning it up and driving it through. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
Adds two data sources:
aws_sesv2_email_identity
aws_sesv2_email_identity_mail_from_attributes
Relations
Relates #26796
References
I mostly cargo-culted the other two data sources that were present
Output from Acceptance Testing
I first tested manually:
terraform refresh
showed the values!Then I did some automated testing: