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_kms_key: Add acceptance test for policy with boolean condition #22093

Merged
merged 4 commits into from
Dec 7, 2021

Conversation

ewbankkit
Copy link
Contributor

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 #21225.

Output from acceptance testing:

Before merge of #22067 and hashicorp/[email protected]:

% make testacc TESTARGS='-run=TestAccKMSKey_Policy_booleanCondition' PKG_NAME=internal/service/kms
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/kms/... -v -count 1 -parallel 20 -run=TestAccKMSKey_Policy_booleanCondition -timeout 180m
=== RUN   TestAccKMSKey_Policy_booleanCondition
=== PAUSE TestAccKMSKey_Policy_booleanCondition
=== CONT  TestAccKMSKey_Policy_booleanCondition
    key_test.go:323: Step 1/2 error: Error running apply: exit status 1
        
        Error: error waiting for KMS Key (5ff04996-79ef-47e5-8f68-fe5bc7a16804) policy propagation: timeout while waiting for state to become 'TRUE' (last state: 'FALSE', timeout: 5m0s)
        
          with aws_kms_key.test,
          on terraform_plugin_test.tf line 4, in resource "aws_kms_key" "test":
           4: resource "aws_kms_key" "test" {
        
--- FAIL: TestAccKMSKey_Policy_booleanCondition (308.33s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/kms	311.870s
FAIL

Now:

% make testacc TESTARGS='-run=TestAccKMSKey_Policy_booleanCondition' PKG_NAME=internal/service/kms
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/kms/... -v -count 1 -parallel 20 -run=TestAccKMSKey_Policy_booleanCondition -timeout 180m
=== RUN   TestAccKMSKey_Policy_booleanCondition
=== PAUSE TestAccKMSKey_Policy_booleanCondition
=== CONT  TestAccKMSKey_Policy_booleanCondition
--- PASS: TestAccKMSKey_Policy_booleanCondition (20.70s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/kms	24.358s

@github-actions github-actions bot added 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 Dec 7, 2021
@ewbankkit ewbankkit merged commit 3669205 into main Dec 7, 2021
@ewbankkit ewbankkit deleted the b-kms_key_policy-propagation-failure branch December 7, 2021 17:35
@github-actions github-actions bot added this to the v3.69.0 milestone Dec 7, 2021
github-actions bot pushed a commit that referenced this pull request Dec 7, 2021
@github-actions
Copy link

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

github-actions bot commented Jun 3, 2022

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 Jun 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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.

KMS resource Key Policy propagation consistent fail
1 participant