Skip to content
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

r/aws_ses_receipt_rule: Retry IAM eventual consistency errors #40873

Conversation

kamilturek
Copy link
Collaborator

@kamilturek kamilturek commented Jan 10, 2025

Description

This PR adds retries for IAM eventual consistency errors when creating or updating the aws_ses_receipt_rule resource.

Relations

Closes #7917
Closes #34259

References

https://docs.aws.amazon.com/ses/latest/APIReference/API_CreateReceiptRule.html
https://docs.aws.amazon.com/ses/latest/APIReference/API_UpdateReceiptRule.html

Output from Acceptance Testing

% make testacc PKG=ses ACCTEST_PARALLELISM=1 TESTARGS="-run=TestAccSESReceiptRule_"  
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/ses/... -v -count 1 -parallel 1  -run=TestAccSESReceiptRule_ -timeout 360m
2025/01/10 19:09:47 Initializing Terraform AWS Provider...
=== RUN   TestAccSESReceiptRule_basic
=== PAUSE TestAccSESReceiptRule_basic
=== RUN   TestAccSESReceiptRule_s3Action
=== PAUSE TestAccSESReceiptRule_s3Action
=== RUN   TestAccSESReceiptRule_s3Action_iamRoleARN
=== PAUSE TestAccSESReceiptRule_s3Action_iamRoleARN
=== RUN   TestAccSESReceiptRule_snsAction
=== PAUSE TestAccSESReceiptRule_snsAction
=== RUN   TestAccSESReceiptRule_snsActionEncoding
=== PAUSE TestAccSESReceiptRule_snsActionEncoding
=== RUN   TestAccSESReceiptRule_lambdaAction
=== PAUSE TestAccSESReceiptRule_lambdaAction
=== RUN   TestAccSESReceiptRule_stopAction
=== PAUSE TestAccSESReceiptRule_stopAction
=== RUN   TestAccSESReceiptRule_order
=== PAUSE TestAccSESReceiptRule_order
=== RUN   TestAccSESReceiptRule_actions
=== PAUSE TestAccSESReceiptRule_actions
=== RUN   TestAccSESReceiptRule_disappears
=== PAUSE TestAccSESReceiptRule_disappears
=== RUN   TestAccSESReceiptRule_Disappears_receiptRuleSet
=== PAUSE TestAccSESReceiptRule_Disappears_receiptRuleSet
=== CONT  TestAccSESReceiptRule_basic
--- PASS: TestAccSESReceiptRule_basic (20.09s)
=== CONT  TestAccSESReceiptRule_stopAction
--- PASS: TestAccSESReceiptRule_stopAction (21.80s)
=== CONT  TestAccSESReceiptRule_Disappears_receiptRuleSet
--- PASS: TestAccSESReceiptRule_Disappears_receiptRuleSet (16.13s)
=== CONT  TestAccSESReceiptRule_disappears
--- PASS: TestAccSESReceiptRule_disappears (16.08s)
=== CONT  TestAccSESReceiptRule_actions
--- PASS: TestAccSESReceiptRule_actions (19.43s)
=== CONT  TestAccSESReceiptRule_order
--- PASS: TestAccSESReceiptRule_order (19.70s)
=== CONT  TestAccSESReceiptRule_snsAction
--- PASS: TestAccSESReceiptRule_snsAction (21.11s)
=== CONT  TestAccSESReceiptRule_lambdaAction
--- PASS: TestAccSESReceiptRule_lambdaAction (39.75s)
=== CONT  TestAccSESReceiptRule_snsActionEncoding
--- PASS: TestAccSESReceiptRule_snsActionEncoding (21.13s)
=== CONT  TestAccSESReceiptRule_s3Action_iamRoleARN
--- PASS: TestAccSESReceiptRule_s3Action_iamRoleARN (31.36s)
=== CONT  TestAccSESReceiptRule_s3Action
--- PASS: TestAccSESReceiptRule_s3Action (30.97s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ses        263.170s

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added service/ses Issues and PRs that pertain to the ses service. needs-triage Waiting for first response or review from a maintainer. external-maintainer Contribution from a trusted external contributor. labels Jan 10, 2025
@kamilturek kamilturek added bug Addresses a defect in current functionality. eventual-consistency Pertains to eventual consistency issues. labels Jan 10, 2025
@kamilturek kamilturek marked this pull request as ready for review January 10, 2025 18:23
@kamilturek kamilturek requested a review from a team as a code owner January 10, 2025 18:23
@jar-b jar-b removed the needs-triage Waiting for first response or review from a maintainer. label Jan 10, 2025
Copy link
Member

@jar-b jar-b left a 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=ses TESTS=TestAccSESReceiptRule_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/ses/... -v -count 1 -parallel 20 -run='TestAccSESReceiptRule_'  -timeout 360m
2025/01/10 14:22:44 Initializing Terraform AWS Provider...

--- PASS: TestAccSESReceiptRule_Disappears_receiptRuleSet (18.01s)
--- PASS: TestAccSESReceiptRule_disappears (18.24s)
--- PASS: TestAccSESReceiptRule_actions (19.76s)
--- PASS: TestAccSESReceiptRule_basic (20.64s)
--- PASS: TestAccSESReceiptRule_order (20.94s)
--- PASS: TestAccSESReceiptRule_snsAction (21.59s)
--- PASS: TestAccSESReceiptRule_snsActionEncoding (21.62s)
--- PASS: TestAccSESReceiptRule_stopAction (21.77s)
--- PASS: TestAccSESReceiptRule_s3Action (29.74s)
--- PASS: TestAccSESReceiptRule_s3Action_iamRoleARN (29.86s)
--- PASS: TestAccSESReceiptRule_lambdaAction (33.12s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ses        45.201s

@jar-b
Copy link
Member

jar-b commented Jan 10, 2025

Thanks for the fix, @kamilturek! 👍

@kamilturek
Copy link
Collaborator Author

Closes also #34259.

Copy link
Contributor

@nam054 nam054 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@jar-b jar-b merged commit 13cded7 into hashicorp:main Jan 10, 2025
40 checks passed
@github-actions github-actions bot added this to the v5.84.0 milestone Jan 10, 2025
@kamilturek kamilturek deleted the b-aws-ses-receipt-rule-retry-iam-eventual-consistency-errors branch January 10, 2025 23:25
Copy link

This functionality has been released in v5.84.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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. eventual-consistency Pertains to eventual consistency issues. external-maintainer Contribution from a trusted external contributor. service/ses Issues and PRs that pertain to the ses service.
Projects
None yet
3 participants