# Generated by tools/hardened.py from ../t1. Edit t1 or the script; this file is regenerated. variable "subscription_id" { description = "Subscription whose activity log is watched, as a GUID. The workspace and alerts go in it too." type = string validation { condition = can(regex("^[0-9a-fA-F-]{36}$", var.subscription_id)) error_message = "Give the subscription ID as a GUID." } } variable "resource_group_name" { description = "An existing resource group for the workspace, alerts, and saved queries. Keep it apart from workloads: Standard locks it, so nothing in it can be deleted." 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." } validation { condition = length(distinct([for e in var.alert_emails : lower(e)])) == length(var.alert_emails) error_message = "Name each address once." } } variable "expected_callers" { description = "Callers that fetch keys, change vault access, and change logging as part of their job, such as the deployment pipeline. Give a person's UPN, and for an app or managed identity both its application ID and its object ID, because the activity log shows either. Their changes do not alert. Every entry is a blind spot, so keep it short." type = list(string) default = [] } variable "sensitive_storage_account_ids" { description = "Storage accounts whose blob reads are recorded request by request, so bulk downloads can be seen. Leave empty to skip." type = list(string) default = [] validation { condition = alltrue([for id in var.sensitive_storage_account_ids : can(regex("^/subscriptions/[^/]+/resourceGroups/[^/]+/providers/Microsoft.Storage/storageAccounts/[^/]+$", id))]) error_message = "Give each account's full resource ID, /subscriptions/.../providers/Microsoft.Storage/storageAccounts/." } } variable "bulk_read_gigabytes" { description = "Gigabytes (10^9 bytes) one caller may read in an hour, across the sensitive accounts, before the alert fires. Reads with a key or a SAS name no one, so they are totalled per account. Set it from a week of normal use; the default is a starting point." type = number default = 5 validation { condition = var.bulk_read_gigabytes > 0 error_message = "The threshold must be above zero." } } variable "retention_days" { description = "How long the workspace keeps the activity log and the read records. 90 days of the activity log are included in its free ingestion; reads and longer retention are billed." type = number default = 365 validation { condition = var.retention_days >= 90 && var.retention_days <= 730 error_message = "Keep at least 90 days, and Azure allows up to 730." } } 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 = {} }