variable "name" { description = "What the key protects, used in its alias and description, such as app-data." type = string default = "app-data" } variable "enabled" { description = "The off switch. Set to false and apply, and everything encrypted with this key becomes unreadable until it is set back." type = bool default = true } variable "key_admin_arns" { description = "Roles that may manage the key: change its policy, rotate it, switch it off, schedule deletion. They cannot encrypt or decrypt with it." type = list(string) default = [] } variable "key_user_arns" { description = "Roles that may encrypt and decrypt with the key. They cannot manage it." type = list(string) default = [] } variable "alert_email" { description = "Address to email when anyone switches a key off, schedules deletion, or changes a key policy. Leave empty to create the topic without a subscription." type = string default = "" } variable "deletion_window_days" { description = "How long a scheduled deletion waits, during which it can be cancelled. Between 7 and 30." type = number default = 30 validation { condition = var.deletion_window_days >= 7 && var.deletion_window_days <= 30 error_message = "AWS allows between 7 and 30 days." } } variable "owner" { description = "Tag contract: accountable team." type = string default = "security-engineering" } variable "environment" { description = "Tag contract: environment." type = string default = "prod" } variable "extra_tags" { description = "Additional tags merged over the contract." type = map(string) default = {} }