-
Notifications
You must be signed in to change notification settings - Fork 2
add: kv (key_value) secret type #338
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
Changes from 5 commits
71d843d
a164217
a5c2a1a
d2dcc0c
a466781
c0a340c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,15 +23,20 @@ variable "secret_type" { | |
| description = "Type of secret to create, must be one of: arbitrary, username_password, imported_cert, service_credentials" | ||
|
|
||
| validation { | ||
| condition = contains(["arbitrary", "username_password", "imported_cert", "service_credentials"], var.secret_type) #checkov:skip=CKV_SECRET_6 | ||
| error_message = "Only supported secrets types are arbitrary, username_password, imported_cert, or service_credentials" | ||
| condition = contains(["arbitrary", "username_password", "imported_cert", "key_value", "service_credentials"], var.secret_type) #checkov:skip=CKV_SECRET_6 | ||
| error_message = "Only supported secrets types are arbitrary, username_password, key_value , imported_cert, or service_credentials" | ||
| } | ||
|
|
||
| validation { | ||
| condition = (var.secret_type == "username_password" || var.secret_type == "arbitrary") ? var.secret_payload_password != "" : true | ||
| error_message = "When creating a username_password or arbitrary secret, a value for `secret_payload_password` is required." | ||
| } | ||
|
|
||
| validation { | ||
| condition = var.secret_type == "key_value" ? var.secret_kv_data != null : true | ||
| error_message = "When creating a key_value secret, a value for `secret_kv_data` is required." | ||
| } | ||
|
|
||
| validation { | ||
| condition = var.secret_type == "imported_cert" ? var.imported_cert_certificate != null : true | ||
| error_message = "When creating an imported_cert secret, value for `imported_cert_certificate` cannot be null." | ||
|
|
@@ -96,6 +101,13 @@ variable "secret_payload_password" { | |
| default = "" #tfsec:ignore:general-secrets-no-plaintext-exposure | ||
| } | ||
|
|
||
| variable "secret_kv_data" { | ||
| type = map(any) | ||
|
||
| description = "key-value secret data" | ||
| sensitive = true | ||
| default = null | ||
| } | ||
|
|
||
| variable "secret_auto_rotation" { | ||
| type = bool | ||
| description = "Whether to configure automatic rotation. Applies only to the `username_password` and `service_credentials` secret types." | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.