-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 retry on MalformedPolicyDocumentException
to wait for IAM propagation on KMS policy update
#24697
Add retry on MalformedPolicyDocumentException
to wait for IAM propagation on KMS policy update
#24697
Conversation
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.
Welcome @neinkeinkaffee 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
MalformedPolicyDocumentException
to wait for IAM propagation on KMS policy updateMalformedPolicyDocumentException
to wait for IAM propagation on KMS policy update
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 TESTS=TestAccKMSKey_Policy PKG=kms
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/kms/... -v -count 1 -parallel 20 -run='TestAccKMSKey_Policy' -timeout 180m
=== RUN TestAccKMSKey_Policy_basic
=== PAUSE TestAccKMSKey_Policy_basic
=== RUN TestAccKMSKey_Policy_bypass
=== PAUSE TestAccKMSKey_Policy_bypass
=== RUN TestAccKMSKey_Policy_bypassUpdate
=== PAUSE TestAccKMSKey_Policy_bypassUpdate
=== RUN TestAccKMSKey_Policy_iamRole
=== PAUSE TestAccKMSKey_Policy_iamRole
=== RUN TestAccKMSKey_Policy_iamRoleUpdate
=== PAUSE TestAccKMSKey_Policy_iamRoleUpdate
=== RUN TestAccKMSKey_Policy_iamRoleOrder
=== PAUSE TestAccKMSKey_Policy_iamRoleOrder
=== RUN TestAccKMSKey_Policy_iamServiceLinkedRole
=== PAUSE TestAccKMSKey_Policy_iamServiceLinkedRole
=== RUN TestAccKMSKey_Policy_booleanCondition
=== PAUSE TestAccKMSKey_Policy_booleanCondition
=== CONT TestAccKMSKey_Policy_basic
=== CONT TestAccKMSKey_Policy_iamRoleUpdate
=== CONT TestAccKMSKey_Policy_bypass
=== CONT TestAccKMSKey_Policy_booleanCondition
=== CONT TestAccKMSKey_Policy_bypassUpdate
=== CONT TestAccKMSKey_Policy_iamRoleOrder
=== CONT TestAccKMSKey_Policy_iamRole
=== CONT TestAccKMSKey_Policy_iamServiceLinkedRole
--- PASS: TestAccKMSKey_Policy_booleanCondition (25.38s)
--- PASS: TestAccKMSKey_Policy_basic (37.70s)
--- PASS: TestAccKMSKey_Policy_bypassUpdate (38.07s)
--- PASS: TestAccKMSKey_Policy_iamServiceLinkedRole (54.02s)
--- PASS: TestAccKMSKey_Policy_iamRoleUpdate (52.93s)
--- PASS: TestAccKMSKey_Policy_iamRole (55.41s)
--- PASS: TestAccKMSKey_Policy_iamRoleOrder (70.39s)
--- PASS: TestAccKMSKey_Policy_bypass (151.56s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/kms 155.690s
@neinkeinkaffee Thanks for the contribution 🎉 👏. |
1 similar comment
@neinkeinkaffee Thanks for the contribution 🎉 👏. |
This functionality has been released in v4.14.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! |
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. |
Community Note
Relates OR Closes #24696
This PR proposes to retry KMS policy updates when a
MalformedPolicyDocumentException
occurs. The intention is to avoid failing when a KMS policy reference IAM resources that get created at the same time.Output from acceptance testing: