FEAT: added kms_key_id support to secretsmanager-secret module
This commit is contained in:
parent
03f2c0c711
commit
a87af8f557
@ -7,6 +7,7 @@ resource "random_id" "rid" {
|
||||
resource "aws_secretsmanager_secret" "secret1" {
|
||||
name = "${var.secret_name}-${random_id.rid.dec}"
|
||||
description = var.secret_description
|
||||
kms_key_id = var.kms_key_id == null ? null : var.kms_key_id
|
||||
}
|
||||
|
||||
resource "aws_secretsmanager_secret_version" "this" {
|
||||
|
@ -14,4 +14,10 @@ variable "generate_secret" {
|
||||
type = bool
|
||||
default = false
|
||||
description = "If set to true, a secure password will be generated and saved."
|
||||
}
|
||||
|
||||
variable kms_key_id {
|
||||
type = string
|
||||
default = null
|
||||
description = "Custom kms key id. If not specified, the default key aws/secretmanager key will be used."
|
||||
}
|
Loading…
Reference in New Issue
Block a user