variable "org_id" { description = "Numeric organisation ID." type = string } variable "security_project" { description = "Project that contains the log bucket, alerts, and saved queries. Keep it separate from workloads." type = string } variable "alert_emails" { description = "Addresses that receive the alerts. Prefer an on-call address over a person." type = list(string) validation { condition = length(var.alert_emails) > 0 error_message = "Give at least one address, or the alerts reach no one." } } variable "expected_principals" { description = "Service accounts that change logging, Model Armor, or enabled APIs as part of their job, such as the deployment pipeline. Their changes do not alert, and the bucket still keeps them. Every entry is a blind spot, so keep it short." type = list(string) default = [] validation { condition = alltrue([for p in var.expected_principals : can(regex("^[^@\\s]+@[^@\\s]+$", p))]) error_message = "Each entry must be an email address, such as deployer@my-project.iam.gserviceaccount.com." } } variable "model_callers" { description = "Principals allowed to call models, by the email address the audit log records for them. When set, a model call by anyone else alerts. Leave empty for no such alert." type = list(string) default = [] validation { condition = alltrue([for p in var.model_callers : can(regex("^[^@\\s]+@[^@\\s]+$", p))]) error_message = "Each entry must be an email address, such as chat-app@my-project.iam.gserviceaccount.com." } } variable "allowed_models" { description = "Models and features the organisation may use, as model_id:feature_family, such as publishers/anthropic/models/claude-sonnet-4-6:predict. When set, an organisation policy refuses every other model and feature. Leave empty to allow all." type = list(string) default = [] validation { condition = alltrue([for m in var.allowed_models : can(regex("^(is:)?publishers/[^/\\s]+/models/[^:/\\s]+:[a-z_]+$", m))]) error_message = "Each entry must be model_id:feature_family, such as publishers/google/models/gemini-1.0-pro:predict." } } variable "model_armor_projects" { description = "Projects, by ID, whose Vertex AI generateContent calls Model Armor screens. Vertex AI must already be on in each, so its service agent exists. Leave empty to skip." type = list(string) default = [] validation { condition = alltrue([for p in var.model_armor_projects : can(regex("^[a-z][a-z0-9-]{4,28}[a-z0-9]$", p))]) error_message = "Each entry must be a project ID, such as my-ai-project." } } variable "model_armor_mode" { description = "inspect_only records what Model Armor finds and lets the call through. inspect_and_block also refuses the call. Start with inspect_only and read a week of findings first." type = string default = "inspect_only" validation { condition = contains(["inspect_only", "inspect_and_block"], var.model_armor_mode) error_message = "Use inspect_only or inspect_and_block." } } variable "model_armor_confidence" { description = "How sure Model Armor must be before a filter matches: LOW_AND_ABOVE, MEDIUM_AND_ABOVE, or HIGH. Lower catches more, and in inspect_and_block refuses more good calls." type = string default = "MEDIUM_AND_ABOVE" validation { condition = contains(["LOW_AND_ABOVE", "MEDIUM_AND_ABOVE", "HIGH"], var.model_armor_confidence) error_message = "Use LOW_AND_ABOVE, MEDIUM_AND_ABOVE, or HIGH." } } variable "retention_days" { description = "How long the model calls and matched changes are kept." type = number default = 400 } variable "owner" { description = "Label contract: accountable team. Lowercase, because labels must be." type = string default = "security-operations" } variable "environment" { description = "Label contract: environment." type = string default = "prod" } variable "extra_labels" { description = "Additional labels merged over the contract." type = map(string) default = {} }