variable "env" {
  type    = string
  default = "dev"
}

variable "aws_region" {
  type = string
}

variable "cloudformation_region" {
  type    = string
  default = "us-west-2"
}

variable "availability_zones" {
  type = list(string)
}

variable "logical_region_name" {
  type = string

  validation {
    condition     = length("${var.env}-seed-${var.logical_region_name}-cluster-") <= 38
    error_message = "The derived EKS IAM role name prefix must not exceed 38 characters."
  }
}

variable "enable_falco" {
  type        = bool
  default     = true
  description = "Deploy Falco to the regional control-plane Seed EKS cluster."
}

variable "dataplane_account" {
  type = string
}

variable "byoc_tenant_id" {
  type = string
}

variable "byoc_ecr" {
  type = string
}

variable "seed_eks" {
  type    = any
  default = {}
}

variable "shoot_eks" {
  type    = any
  default = {}
}

variable "seed_vpc" {
  type    = any
  default = {}
}

variable "shoot_vpc" {
  type    = any
  default = {}
}

# These three vars default to null, in which case their values are read from
# CloudFormation stack outputs in the customer (dataplane) account at plan time.
# Pass them explicitly when the customer has NOT used the standard CloudFormation-
# backed account setup (tidbcloud/byoc-account-setup) — for example, if the customer
# ran their own initialisation scripts instead, no CloudFormation stacks will exist
# and the data source lookups would fail.
variable "tidb_hosted_zone_id" {
  type    = string
  default = null
}

variable "o11y_hosted_zone_id" {
  type    = string
  default = null
}

variable "pca_arn" {
  type    = string
  default = null
}

variable "shoot_tags" {
  description = "Customer-defined tags to apply to shoot (dataplane) resources"
  type        = map(string)
  default     = {}
}

variable "destroy_mode" {
  type    = bool
  default = false
}
