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

kms/key: Preserve order in JSON policy lists #21969

Merged
merged 9 commits into from
Dec 1, 2021

Conversation

YakDriver
Copy link
Member

@YakDriver YakDriver commented Nov 30, 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

Related #21968
Related #11801
Closes #20665

Output from acceptance testing (us-west-2):

% make testacc TESTS=TestAccKMSKey PKG=kms
--- PASS: TestAccKMSKey_disappears (21.67s)
--- PASS: TestAccKMSKeyDataSource_basic (26.00s)
--- PASS: TestAccKMSKeyDataSource_multiRegionConfiguration (26.02s)
--- PASS: TestAccKMSKey_asymmetricKey (26.17s)
--- PASS: TestAccKMSKey_multiRegion (29.32s)
--- PASS: TestAccKMSKey_basic (29.34s)
--- PASS: TestAccKMSKeyDataSource_grantToken (35.02s)
--- PASS: TestAccKMSKey_Policy_iamRole (45.03s)
--- PASS: TestAccKMSKey_Policy_basic (48.86s)
--- PASS: TestAccKMSKey_Policy_bypassUpdate (48.93s)
--- PASS: TestAccKMSKey_Policy_iamServiceLinkedRole (56.73s)
--- PASS: TestAccKMSKey_Policy_iamRoleOrder (72.36s)
--- PASS: TestAccKMSKey_tags (149.78s)
--- PASS: TestAccKMSKey_Policy_bypass (151.11s)
--- PASS: TestAccKMSKey_isEnabled (311.59s)

Output from acceptance testing (GovCloud):

--- PASS: TestAccKMSKey_disappears (26.33s)
--- PASS: TestAccKMSKey_asymmetricKey (30.51s)
--- PASS: TestAccKMSKeyDataSource_multiRegionConfiguration (31.29s)
--- PASS: TestAccKMSKeyDataSource_basic (31.31s)
--- PASS: TestAccKMSKey_basic (34.49s)
--- PASS: TestAccKMSKey_multiRegion (35.02s)
--- PASS: TestAccKMSKeyDataSource_grantToken (37.59s)
--- PASS: TestAccKMSKey_Policy_iamRole (50.01s)
--- PASS: TestAccKMSKey_Policy_basic (52.51s)
--- PASS: TestAccKMSKey_Policy_iamServiceLinkedRole (58.46s)
--- PASS: TestAccKMSKey_Policy_iamRoleOrder (81.80s)
--- PASS: TestAccKMSKey_Policy_bypassUpdate (137.10s)
--- PASS: TestAccKMSKey_Policy_bypass (161.55s)
--- PASS: TestAccKMSKey_tags (212.49s)
--- PASS: TestAccKMSKey_isEnabled (301.09s)

@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. verify Pertains to the verify package (i.e., provider-level validating, diff suppression, etc.) size/XL Managed by automation to categorize the size of a PR. labels Nov 30, 2021
@YakDriver YakDriver changed the title kms/key: Ignore order in JSON policy lists kms/key: Preserve order in JSON policy lists Nov 30, 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 TESTS=TestAccKMSKey_ PKG=kms
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/kms/... -v -count 1 -parallel 20 -run='TestAccKMSKey_' -timeout 180m
=== RUN   TestAccKMSKey_basic
=== PAUSE TestAccKMSKey_basic
=== RUN   TestAccKMSKey_disappears
=== PAUSE TestAccKMSKey_disappears
=== RUN   TestAccKMSKey_multiRegion
=== PAUSE TestAccKMSKey_multiRegion
=== RUN   TestAccKMSKey_asymmetricKey
=== PAUSE TestAccKMSKey_asymmetricKey
=== 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_iamRoleOrder
=== PAUSE TestAccKMSKey_Policy_iamRoleOrder
=== RUN   TestAccKMSKey_Policy_iamServiceLinkedRole
=== PAUSE TestAccKMSKey_Policy_iamServiceLinkedRole
=== RUN   TestAccKMSKey_isEnabled
=== PAUSE TestAccKMSKey_isEnabled
=== RUN   TestAccKMSKey_tags
=== PAUSE TestAccKMSKey_tags
=== CONT  TestAccKMSKey_basic
=== CONT  TestAccKMSKey_Policy_iamRole
=== CONT  TestAccKMSKey_isEnabled
=== CONT  TestAccKMSKey_Policy_iamRoleOrder
=== CONT  TestAccKMSKey_Policy_iamServiceLinkedRole
=== CONT  TestAccKMSKey_tags
=== CONT  TestAccKMSKey_Policy_bypass
=== CONT  TestAccKMSKey_Policy_basic
=== CONT  TestAccKMSKey_Policy_bypassUpdate
=== CONT  TestAccKMSKey_multiRegion
=== CONT  TestAccKMSKey_asymmetricKey
=== CONT  TestAccKMSKey_disappears
--- PASS: TestAccKMSKey_disappears (19.10s)
--- PASS: TestAccKMSKey_asymmetricKey (24.12s)
--- PASS: TestAccKMSKey_multiRegion (27.49s)
--- PASS: TestAccKMSKey_basic (27.59s)
--- PASS: TestAccKMSKey_Policy_iamRole (44.76s)
--- PASS: TestAccKMSKey_Policy_basic (45.60s)
--- PASS: TestAccKMSKey_Policy_bypassUpdate (45.69s)
--- PASS: TestAccKMSKey_Policy_iamServiceLinkedRole (53.87s)
--- PASS: TestAccKMSKey_tags (70.64s)
--- PASS: TestAccKMSKey_Policy_iamRoleOrder (76.46s)
--- PASS: TestAccKMSKey_Policy_bypass (152.94s)
--- PASS: TestAccKMSKey_isEnabled (283.55s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/kms	287.176s

@YakDriver YakDriver merged commit de40d0c into main Dec 1, 2021
@YakDriver YakDriver deleted the b-equivalent-policies-diffs branch December 1, 2021 14:59
@github-actions github-actions bot added this to the v3.68.0 milestone Dec 1, 2021
github-actions bot pushed a commit that referenced this pull request Dec 1, 2021
@github-actions
Copy link

github-actions bot commented Dec 2, 2021

This functionality has been released in v3.68.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 4, 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 4, 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/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. verify Pertains to the verify package (i.e., provider-level validating, diff suppression, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IAM Policy Principals: Objects have changed outside of Terraform
2 participants