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

fix: Set grant_token as sensitive for aws_kms_grant #37593

Merged

Conversation

acwwat
Copy link
Contributor

@acwwat acwwat commented May 20, 2024

Description

This PR is to set the grant token as sensitive in the aws_kms_grant resource for a bit more security.

Relations

Closes #36450

References

n/a

Output from Acceptance Testing

$ make testacc TESTS=TestAccKMSGrant_ PKG=kms
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/kms/... -v -count 1 -parallel 20 -run='TestAccKMSGrant_'  -timeout 360m
=== RUN   TestAccKMSGrant_basic
=== PAUSE TestAccKMSGrant_basic
=== RUN   TestAccKMSGrant_withConstraints
=== PAUSE TestAccKMSGrant_withConstraints
=== RUN   TestAccKMSGrant_withRetiringPrincipal
=== PAUSE TestAccKMSGrant_withRetiringPrincipal
=== RUN   TestAccKMSGrant_bare
=== PAUSE TestAccKMSGrant_bare
=== RUN   TestAccKMSGrant_arn
=== PAUSE TestAccKMSGrant_arn
=== RUN   TestAccKMSGrant_asymmetricKey
=== PAUSE TestAccKMSGrant_asymmetricKey
=== RUN   TestAccKMSGrant_disappears
=== PAUSE TestAccKMSGrant_disappears
=== RUN   TestAccKMSGrant_crossAccountARN
=== PAUSE TestAccKMSGrant_crossAccountARN
=== RUN   TestAccKMSGrant_service
=== PAUSE TestAccKMSGrant_service
=== CONT  TestAccKMSGrant_basic
=== CONT  TestAccKMSGrant_asymmetricKey
=== CONT  TestAccKMSGrant_bare
=== CONT  TestAccKMSGrant_withRetiringPrincipal
=== CONT  TestAccKMSGrant_withConstraints
=== CONT  TestAccKMSGrant_arn
=== CONT  TestAccKMSGrant_disappears
=== CONT  TestAccKMSGrant_service
=== CONT  TestAccKMSGrant_crossAccountARN
    grant_test.go:252: skipping test because at least one environment variable of [AWS_ALTERNATE_PROFILE AWS_ALTERNATE_ACCESS_KEY_ID] must be set. Usage: credentials for running acceptance testing in alternate AWS account.
--- SKIP: TestAccKMSGrant_crossAccountARN (0.93s)
--- PASS: TestAccKMSGrant_service (21.64s)
--- PASS: TestAccKMSGrant_withRetiringPrincipal (33.66s)
--- PASS: TestAccKMSGrant_bare (33.67s)
--- PASS: TestAccKMSGrant_arn (33.69s)
--- PASS: TestAccKMSGrant_basic (33.70s)
--- PASS: TestAccKMSGrant_asymmetricKey (33.77s)
--- PASS: TestAccKMSGrant_withConstraints (43.57s)
--- PASS: TestAccKMSGrant_disappears (208.78s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/kms        208.980s

Copy link

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/kms Issues and PRs that pertain to the kms service. labels May 20, 2024
@terraform-aws-provider terraform-aws-provider bot added needs-triage Waiting for first response or review from a maintainer. external-maintainer Contribution from a trusted external contributor. labels May 20, 2024
@acwwat acwwat force-pushed the b-aws_kms_grant-mark_grant_token_sensitive branch from 59a790d to b24f50f Compare May 20, 2024 04:58
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label May 20, 2024
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 🚀.

@ewbankkit
Copy link
Contributor

@acwwat Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit b955849 into hashicorp:main May 20, 2024
33 checks passed
@github-actions github-actions bot added this to the v5.51.0 milestone May 20, 2024
@acwwat acwwat deleted the b-aws_kms_grant-mark_grant_token_sensitive branch May 22, 2024 03:26
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. external-maintainer Contribution from a trusted external contributor. service/kms Issues and PRs that pertain to the kms service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: KMS grant tokens not marked as sensitive
2 participants