variable "tenancy_ocid" { description = "The tenancy. Network sources and the audit connector live in its root." type = string } variable "compartment_ocids" { description = "Compartments whose Object Storage sits inside the perimeter. Each gets its own deny policy, and its own security zone when a recipe is named. A compartment can be in one zone only, so with a recipe named, list no compartment beneath another." type = list(string) validation { condition = length(var.compartment_ocids) > 0 && alltrue([for c in var.compartment_ocids : startswith(c, "ocid1.compartment.")]) error_message = "Give at least one compartment OCID (ocid1.compartment...)." } } variable "region" { description = "Home region identifier, such as us-ashburn-1. Identity resources are made there." type = string } variable "office_cidrs" { description = "Public address ranges people and systems read data from, as CIDR. Empty allows reads from the named VCNs only." type = list(string) default = [] validation { condition = alltrue([for r in var.office_cidrs : can(cidrhost(r, 0)) && tonumber(split("/", r)[1]) >= (strcontains(r, ":") ? 16 : 8)]) error_message = "Each range must be a CIDR of /8 or narrower for IPv4, /16 or narrower for IPv6. A wider range makes most of the internet inside." } } variable "vcns" { description = "VCNs whose workloads read data through a service gateway, each with the subnet ranges allowed. Functions, OKE pods, and instances that read objects must be here, or their reads are refused too." type = list(object({ vcn_ocid = string ip_ranges = list(string) })) default = [] validation { condition = alltrue([for v in var.vcns : startswith(v.vcn_ocid, "ocid1.vcn.") && length(v.ip_ranges) > 0]) error_message = "Each VCN needs its OCID (ocid1.vcn...) and at least one CIDR." } } variable "alert_emails" { description = "Addresses told when the perimeter's policy or network source is changed or deleted." type = list(string) validation { condition = length(var.alert_emails) > 0 error_message = "Name at least one address, or a change to the perimeter goes unseen." } } variable "security_zone_recipe_ocid" { description = "A security zone recipe to put each compartment under, whose OCID the Security Zones console shows. A recipe refuses new violations at creation and at every change; Oracle's maximum security recipe refuses public buckets and buckets without your own key, and also public subnets, internet gateways, and more, so it can break a workload compartment. Read the recipe before naming it. Empty makes no zone." type = string default = "" validation { condition = var.security_zone_recipe_ocid == "" || startswith(var.security_zone_recipe_ocid, "ocid1.securityzonessecurityrecipe.") error_message = "Give a security zone recipe OCID (ocid1.securityzonessecurityrecipe...), or leave it empty." } } 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 freeform tags merged over the contract." type = map(string) default = {} }