secret_string
Secret value as a string
Secret String Format
Store JSON for structured secrets:
secret_string = jsonencode({
username = "admin"
password = var.db_password
})
Best Practices
- Use JSON for multiple values
- Never commit secrets to version control
- Use variables or parameter store for initial values
Full Module Example
module "secrets_manager" {
source = "registry.patterneddesigns.ca/patterneddesigns/secrets-manager/aws"
version = "0.1.0"
# secret_string
secret_string = "..."
# Other required inputs
name = "..."
}