Terraform module that allows for the creation of multiple secrets and significantly simplifies the process of creating them. Especially comfortable with Terragrunt.
secret rotation temporary disabled
module "secrets" {
source = "zahornyak/multiple-secrets/aws"
secrets = {
my_secret = {
name = "my_secret_name"
recovery_window_in_days = 10
secret_string = "example"
}
your_secret = {
name = "your_secret_name"
recovery_window_in_days = 10
secret_binary = "sha sjhgdhkajwndask"
}
foo = {
name = "bar"
recovery_window_in_days = 0
secret_string = "foo-bar"
}
}
}
module "secrets" {
source = "zahornyak/multiple-secrets/aws"
secrets = {
my_secret = {
name = "my_secret_name"
recovery_window_in_days = 10
secret_string = "example"
}
your_secret = {
name = "your_secret_name"
recovery_window_in_days = 10
secret_binary = "sha sjhgdhkajwndask"
}
}
# Terraform wont change secret string and binary value
unlocked = true
}
module "secrets" {
source = "zahornyak/multiple-secrets/aws"
secrets = {
my_secret = {
name = "my_secret_name"
recovery_window_in_days = 10
secret_string = "example"
}
your_secret = {
name = "your_secret_name"
recovery_window_in_days = 10
secret_binary = "sha sjhgdhkajwndask"
unlocked = true # Terraform wont change secret string and binary value for only that secret
}
}
}
Name | Version |
---|---|
terraform | >= 1.4 |
aws | >= 4.37 |
Name | Version |
---|---|
aws | >= 4.37 |
No modules.
Name | Type |
---|---|
aws_secretsmanager_secret.this | resource |
aws_secretsmanager_secret_version.this | resource |
aws_secretsmanager_secret_version.this_unlocked | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
recovery_window_in_days | Specifies the number of days for recovery window | number |
30 |
no |
secrets | Map of secrets to keep in AWS Secrets Manager | any |
{} |
no |
tags | Specifies a tags | any |
{} |
no |
unlocked | if true - sets the ignore lifecycle policy and disable terraform managing the version of the resource | bool |
false |
no |
Name | Description |
---|---|
secret_arns | Secrets arns map |
secret_ids | Secret ids map |