variable "org_id" { description = "Numeric ID of the Google Cloud organisation linked to the Workspace account." type = string validation { condition = can(regex("^[0-9]+$", var.org_id)) error_message = "Give the numeric organisation ID, from gcloud organizations list." } } 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 = "Name at least one address, or the alerts have nowhere to go." } } variable "expected_admins" { description = "Admin accounts or service accounts that grant roles and change sign-in settings as part of their job, such as a provisioning tool. Their changes do not alert, and the bucket still records them. Every entry is a blind spot, so keep it short." type = list(string) default = [] validation { condition = alltrue([for p in var.expected_admins : can(regex("^[^@\\s]+@[^@\\s]+$", p))]) error_message = "Each entry must be an email address." } } variable "retention_days" { description = "How long the bucket keeps every Workspace audit entry." type = number default = 400 validation { condition = var.retention_days >= 90 && var.retention_days <= 3650 error_message = "Keep at least 90 days; Cloud Logging allows up to 3,650." } } variable "silence_minutes" { description = "Minutes with no Workspace sign-in events before the silence alert fires. A small domain with quiet nights may need more." type = number default = 60 validation { condition = var.silence_minutes >= 30 && var.silence_minutes <= 1440 error_message = "Use between 30 and 1,440 minutes." } } variable "owner" { description = "Label contract: accountable team. Lowercase, because labels must be." type = string default = "security-engineering" } variable "environment" { description = "Label contract: environment." type = string default = "prod" } variable "extra_labels" { description = "Additional labels merged over the contract." type = map(string) default = {} }