variable "description" { description = "Description for the KMS key" type = string default = "Managed by Terraform" } variable "key_usage" { description = "Key usage — ENCRYPT_DECRYPT or SIGN_VERIFY" type = string default = "ENCRYPT_DECRYPT" } variable "customer_master_key_spec" { description = "Key spec — SYMMETRIC_DEFAULT, RSA_2048, RSA_4096, ECC_NIST_P256, etc." type = string default = "SYMMETRIC_DEFAULT" } variable "enable_key_rotation" { description = "Enable automatic annual key rotation" type = bool default = true } variable "deletion_window_in_days" { description = "Days before key deletion after destruction (7–30)" type = number default = 30 } variable "multi_region" { description = "Create a multi-region primary key" type = bool default = false } variable "policy" { description = "JSON key policy document (optional — uses AWS default if null)" type = string default = null } variable "grants" { description = "Map of KMS grants to create" type = map(object({ grantee_principal = string operations = list(string) retiring_principal = optional(string, null) constraints = optional(object({ encryption_context_equals = optional(map(string), null) encryption_context_subset = optional(map(string), null) }), null) })) default = {} } variable "aliases" { description = "List of alias names (without alias/ prefix)" type = list(string) default = [] } variable "cross_account_principals" { description = "List of external account principals allowed to use the key" type = list(string) default = [] } variable "tags" { description = "Resource tags to apply to all resources" type = map(string) default = {} }