Skip to content

Commit

Permalink
Merge pull request #37593 from acwwat/b-aws_kms_grant-mark_grant_toke…
Browse files Browse the repository at this point in the history
…n_sensitive

fix: Set grant_token as sensitive for aws_kms_grant
ewbankkit authored May 20, 2024
2 parents 837f95b + 0ceb165 commit b955849
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/37593.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_kms_grant: Change `grant_token` to [`Sensitive`](https://developer.hashicorp.com/terraform/plugin/best-practices/sensitive-state#using-sensitive-flag-functionality)
```
5 changes: 3 additions & 2 deletions internal/service/kms/grant.go
Original file line number Diff line number Diff line change
@@ -91,8 +91,9 @@ func resourceGrant() *schema.Resource {
Computed: true,
},
"grant_token": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
Sensitive: true,
},
"grantee_principal": {
Type: schema.TypeString,
3 changes: 3 additions & 0 deletions website/docs/r/kms_grant.html.markdown
Original file line number Diff line number Diff line change
@@ -10,6 +10,9 @@ description: |-

Provides a resource-based access control mechanism for a KMS customer master key.

~> **Note:** All arguments including the grant token will be stored in the raw state as plain-text.
[Read more about sensitive data in state](https://www.terraform.io/docs/state/sensitive-data.html).

## Example Usage

```terraform

0 comments on commit b955849

Please sign in to comment.