-
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
resource/securityhub_organization_admin_account: retry on ResourceConflictException during creation #18341
Conversation
fbfef4c
to
d34aca9
Compare
Open question: I wonder if instead of introducing time-boxed retry logic here (which could be hard to scale without a customizable timeout), we should instead have the AWS SDK Go service client automatically retry the error using the logic in client.securityhubconn.Handlers.Retry.PushBack(func(r *request.Request) {
switch r.Operation.Name {
case "EnableOrganizationAdminAccount":
if tfawserr.ErrCodeEquals(r.Error, securityhub.ErrCodeResourceConflictException) {
r.Retryable = aws.Bool(true)
}
}
}) |
Wow i honestly totally forgot about that usage! much preferred 👍 (and am now thinking I've probably over-used that time-boxed logic around the provider 😅 ) |
Output of acceptance tests after changes:
|
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.
Looks great! 🚀
Output from acceptance testing:
--- PASS: TestAccAWSSecurityHub_serial/OrganizationAdminAccount (60.56s)
--- PASS: TestAccAWSSecurityHub_serial/OrganizationAdminAccount/basic (19.04s)
--- PASS: TestAccAWSSecurityHub_serial/OrganizationAdminAccount/disappears (15.77s)
--- PASS: TestAccAWSSecurityHub_serial/OrganizationAdminAccount/MultiRegion (25.75s)
This has been released in version 3.35.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 for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Closes #17996
Output from acceptance testing:
Notes