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

Marking dkim signing key as sensitive #33477

Merged
merged 3 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions internal/service/sesv2/email_identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func ResourceEmailIdentity() *schema.Resource {
"domain_signing_private_key": {
Type: schema.TypeString,
Optional: true,
Sensitive: true,
RequiredWith: []string{"dkim_signing_attributes.0.domain_signing_selector"},
ValidateFunc: validation.All(
validation.StringLenBetween(1, 20480),
Expand Down
5 changes: 3 additions & 2 deletions internal/service/sesv2/email_identity_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ func DataSourceEmailIdentity() *schema.Resource {
Computed: true,
},
"domain_signing_private_key": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
Sensitive: true,
},
"domain_signing_selector": {
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/sesv2_email_identity.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The following arguments are optional:

### dkim_signing_attributes

* `domain_signing_private_key` - (Optional) [Bring Your Own DKIM] A private key that's used to generate a DKIM signature. The private key must use 1024 or 2048-bit RSA encryption, and must be encoded using base64 encoding.
* `domain_signing_private_key` - (Optional, Sensitive) [Bring Your Own DKIM] A private key that's used to generate a DKIM signature. The private key must use 1024 or 2048-bit RSA encryption, and must be encoded using base64 encoding.

-> **NOTE:** You have to delete the first and last lines ('-----BEGIN PRIVATE KEY-----' and '-----END PRIVATE KEY-----', respectively) of the generated private key. Additionally, you have to remove the line breaks in the generated private key. The resulting value is a string of characters with no spaces or line breaks.

Expand Down
Loading