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/kms_key - correctly handle PendingDeletion state #19967

Merged
merged 5 commits into from
Jul 15, 2021

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Jun 25, 2021

Community Note

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

Closes #17889
Relates #19896 (to close we need a solution for the replicas in other regions)

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSKmsKey_'
--- PASS: TestAccAWSKmsKey_disappears (35.87s)
--- PASS: TestAccAWSKmsKey_asymmetricKey (45.35s)
--- PASS: TestAccAWSKmsKey_multiRegion (53.78s)
--- PASS: TestAccAWSKmsKey_basic (54.52s)
--- PASS: TestAccAWSKmsKey_Policy_IamRole (68.53s)
--- PASS: TestAccAWSKmsKey_Policy_IamServiceLinkedRole (77.73s)
--- PASS: TestAccAWSKmsKey_policy (90.72s)
--- PASS: TestAccAWSKmsKey_tags (95.71s)
--- PASS: TestAccAWSKmsKey_isEnabled (251.47s)

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. service/kms Issues and PRs that pertain to the kms service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/M Managed by automation to categorize the size of a PR. labels Jun 25, 2021
@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Jun 25, 2021
@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Jul 15, 2021
Copy link
Contributor

@ewbankkit ewbankkit 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 TESTARGS='-run=TestAccAWSKmsKey_'                                                                        
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSKmsKey_ -timeout 180m
=== RUN   TestAccAWSKmsKey_basic
=== PAUSE TestAccAWSKmsKey_basic
=== RUN   TestAccAWSKmsKey_asymmetricKey
=== PAUSE TestAccAWSKmsKey_asymmetricKey
=== RUN   TestAccAWSKmsKey_disappears
=== PAUSE TestAccAWSKmsKey_disappears
=== RUN   TestAccAWSKmsKey_policy
=== PAUSE TestAccAWSKmsKey_policy
=== RUN   TestAccAWSKmsKey_Policy_IamRole
=== PAUSE TestAccAWSKmsKey_Policy_IamRole
=== RUN   TestAccAWSKmsKey_Policy_IamServiceLinkedRole
=== PAUSE TestAccAWSKmsKey_Policy_IamServiceLinkedRole
=== RUN   TestAccAWSKmsKey_isEnabled
=== PAUSE TestAccAWSKmsKey_isEnabled
=== RUN   TestAccAWSKmsKey_tags
=== PAUSE TestAccAWSKmsKey_tags
=== CONT  TestAccAWSKmsKey_basic
=== CONT  TestAccAWSKmsKey_Policy_IamServiceLinkedRole
=== CONT  TestAccAWSKmsKey_policy
=== CONT  TestAccAWSKmsKey_disappears
=== CONT  TestAccAWSKmsKey_asymmetricKey
=== CONT  TestAccAWSKmsKey_tags
=== CONT  TestAccAWSKmsKey_Policy_IamRole
=== CONT  TestAccAWSKmsKey_isEnabled
--- PASS: TestAccAWSKmsKey_disappears (13.71s)
--- PASS: TestAccAWSKmsKey_asymmetricKey (16.55s)
--- PASS: TestAccAWSKmsKey_basic (19.32s)
--- PASS: TestAccAWSKmsKey_tags (30.44s)
--- PASS: TestAccAWSKmsKey_Policy_IamRole (30.84s)
--- PASS: TestAccAWSKmsKey_policy (31.27s)
--- PASS: TestAccAWSKmsKey_Policy_IamServiceLinkedRole (39.05s)
--- PASS: TestAccAWSKmsKey_isEnabled (224.70s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	227.612s

@ewbankkit ewbankkit changed the title r/kms_key - support multi_region r/kms_key - correctly handle PendingDeletion state Jul 15, 2021
@ewbankkit
Copy link
Contributor

ewbankkit commented Jul 15, 2021

@DrFaust92 Thanks for the contribution 🎉 👏.

Given that multi-Region KMS CMKs have a significantly different lifecycle from standard, single-Region keys I tend to think that a completely separate aws_kms_multi_region_key resource is required.
From this PR I have removed the multi_region attribute and kept the other improvements.

@ewbankkit ewbankkit merged commit a265fbd into hashicorp:main Jul 15, 2021
@github-actions github-actions bot added this to the v3.50.0 milestone Jul 15, 2021
@github-actions
Copy link

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

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
@DrFaust92 DrFaust92 deleted the r/kms_key_multi branch February 12, 2022 12:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/kms Issues and PRs that pertain to the kms service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

acctest/aws_kms_key: disappears test does not wait for key to be in pending deletion state
2 participants