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" {
|
||||
|
@ -15,3 +15,9 @@ variable "generate_secret" {
|
||||
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