variable "name" { description = "Name for the pipeline role." type = string default = "github-deploy" } variable "allowed_subjects" { description = "GitHub token subjects allowed to assume the role. 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." type = list(string) validation { condition = length(var.allowed_subjects) > 0 && alltrue([for s in var.allowed_subjects : can(regex("^repo:[^*]+/[^*]+:", s))]) error_message = "Name at least one subject, each starting repo:org/repo: with no wildcard in the organisation or repository." } } variable "create_oidc_provider" { description = "Create GitHub's OIDC provider. Set false if the account already has one." type = bool default = true } variable "policy_arns" { description = "Managed policies the pipeline role needs, and nothing more." type = list(string) default = [] } variable "permissions_boundary_arn" { description = "A permissions boundary that caps what the role can ever do, whatever is attached later. Leave empty for none." type = string default = "" } variable "eks_cluster_name" { description = "An EKS cluster to give one Kubernetes service account an AWS role through Pod Identity. Leave empty to skip." type = string default = "" } variable "eks_namespace" { description = "Namespace of that service account." type = string default = "default" } variable "eks_service_account" { description = "Name of that service account." type = string default = "app" } variable "eks_policy_arns" { description = "Managed policies the pod role needs." type = list(string) default = [] } variable "owner" { description = "Tag contract: accountable team." type = string default = "platform-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 = {} }