# Variables for Phase 2 Deployment

variable "environment" {
  description = "Environment (prod, dev, test, staging) - must match Phase 1"
  type        = string
  default     = "prod"
  validation {
    condition     = contains(["prod", "dev", "test", "staging"], var.environment)
    error_message = "Environment must be one of: prod, dev, test, staging"
  }
}

variable "vm_admin_username" {
  description = "Admin username for VMs - must match Phase 1"
  type        = string
  default     = "besuadmin"
}

variable "ssh_private_key_path" {
  description = "Path to SSH private key for VM access (corresponds to public key used in Phase 1)"
  type        = string
  sensitive   = true
}


variable "phase1_vm_info" {
  description = "Phase 1 VM information (region -> {vm_names, private_ips, public_ips, resource_group}). Can be passed from Phase 1 outputs."
  type = map(object({
    vm_names    = list(string)
    private_ips = list(string)
    public_ips  = list(string)
    resource_group = string
    region      = string
  }))
  default = {}
}

variable "docker_compose_source_path" {
  description = "Local path to docker-compose phase2 files directory"
  type        = string
  default     = "../../../docker/phase2"
}

variable "tags" {
  description = "Tags to apply to all resources"
  type        = map(string)
  default = {
    Environment = "production"
    Project     = "DeFi Oracle Meta Mainnet"
    ChainID     = "138"
    ManagedBy   = "Terraform"
    CostCenter  = "Blockchain"
    Owner       = "DevOps Team"
  }
}

