variable "subscription_id" { description = "Subscription that contains the cluster. The workspace and the alerts go in the cluster's resource group." type = string } variable "cluster_name" { description = "Name of the AKS cluster whose audit log this keeps." type = string } variable "cluster_resource_group" { description = "The cluster's own resource group. The workspace, action group, and alerts go here, each with a cannot-delete lock, so the group cannot be deleted while they are in it." type = string } variable "alert_emails" { description = "Addresses that receive the alerts." type = list(string) validation { condition = length(var.alert_emails) > 0 error_message = "Name at least one address, or the alerts have nowhere to go." } validation { condition = length(distinct([for e in var.alert_emails : lower(e)])) == length(var.alert_emails) error_message = "Name each address once." } } variable "retention_days" { description = "How long the workspace keeps the audit events. 30 to 730. The first 31 days are included in the ingestion price; the rest is billed per gigabyte per month." type = number default = 365 validation { condition = var.retention_days >= 30 && var.retention_days <= 730 error_message = "Azure allows 30 to 730 days." } } variable "full_audit" { description = "Keep every audit event (kube-audit). False keeps kube-audit-admin, which drops every get and list. That is cheaper on a busy cluster, and it loses secrets read by people, refused reads, and exec opened as a get over a WebSocket, which is how newer kubectl clients open it." type = bool default = true } variable "siem_eventhub_authorization_rule_id" { description = "An Event Hubs namespace authorization rule with send rights, such as the one the SIEM ingest template builds. With siem_eventhub_name, every audit event is also sent there. Leave empty to skip." type = string default = "" } variable "siem_eventhub_name" { description = "The event hub in that namespace that feeds the SIEM." type = string default = "" } 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 = {} }