# Generated by tools/hardened.py from ../t1. Edit t1 or the script; this file is regenerated. variable "tenancy_ocid" { description = "The tenancy. Written into the session configuration the workflow builds." type = string } variable "compartment_ocid" { description = "Compartment the pipeline deploys to. Every grant below is limited to it." type = string } variable "identity_domain_ocid" { description = "OCID of the identity domain that contains the exchange client, the service user, and the trust. Its URL is looked up." type = string validation { condition = startswith(var.identity_domain_ocid, "ocid1.domain.") error_message = "Give the domain's OCID (ocid1.domain...), from its Overview page." } } variable "region" { description = "Region identifier the workflow signs in to, such as us-ashburn-1." type = string } variable "repository" { description = "The GitHub repository allowed to sign in, as org/repo. Used in names and descriptions." type = string validation { condition = can(regex("^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$", var.repository)) error_message = "Give one repository as org/repo, with no wildcard." } } variable "allowed_subjects" { description = "GitHub token subjects allowed to sign in, matched exactly. repo:org/repo:ref:refs/heads/main is one branch; repo:org/repo:environment:production is one deployment environment, which can require a reviewer in GitHub. A repository created after 15 July 2026 carries IDs: repo:org@123456/repo@456789:ref:refs/heads/main. Read the value from a real token; the verify output shows how." type = list(string) validation { condition = length(var.allowed_subjects) > 0 && alltrue([for s in var.allowed_subjects : can(regex("^repo:[^*?']+/[^*?':]+:(ref:refs/(heads|tags)/[^*?']+|environment:[^*?']+|pull_request)$", s))]) error_message = "Name at least one subject, each repo:org/repo: followed by ref:refs/heads/, ref:refs/tags/, environment:, or pull_request, with no wildcard." } } variable "grants" { description = "What the pipeline may do in the compartment, and nothing more. Each grant is a verb, a resource type, and an optional condition, such as {verb = \"manage\", resource = \"objects\", where = \"target.bucket.name = 'releases'\"}. A condition is one comparison, or several joined inside one any {} or all {}; for OKE grants it is added to the workload's own all {}, so it must be comparisons only. manage all-resources is refused." type = list(object({ verb = string resource = string where = optional(string, "") })) default = [] validation { condition = alltrue([for g in var.grants : contains(["inspect", "read", "use", "manage"], g.verb) && g.resource != "all-resources" && can(regex("^[a-z][a-z-]*$", g.resource))]) error_message = "Each grant needs a verb of inspect, read, use, or manage, and one resource type such as objects or instance-family, never all-resources." } } variable "oke_cluster_ocid" { description = "An OKE cluster whose Kubernetes service account may act in the compartment through workload identity. The cluster must be an enhanced cluster. Leave empty to skip." type = string default = "" validation { condition = var.oke_cluster_ocid == "" || startswith(var.oke_cluster_ocid, "ocid1.cluster.") error_message = "Give the cluster's OCID (ocid1.cluster...), or leave it empty." } } variable "oke_namespace" { description = "The Kubernetes namespace of the service account." type = string default = "default" } variable "oke_service_account" { description = "That Kubernetes service account's name." type = string default = "app" } variable "oke_grants" { description = "What that service account may do in the compartment, in the same form as grants. Empty means the same grants as the pipeline." type = list(object({ verb = string resource = string where = optional(string, "") })) default = [] validation { condition = alltrue([for g in var.oke_grants : contains(["inspect", "read", "use", "manage"], g.verb) && g.resource != "all-resources" && can(regex("^[a-z][a-z-]*$", g.resource)) && !contains(["any", "all"], substr(trimspace(g.where), 0, 3))]) error_message = "Each grant needs a verb of inspect, read, use, or manage, and one resource type, never all-resources. Its condition joins the workload's own all {}, so it must be comparisons only, with no any {} or all {} of its own." } } 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 = {} }