# ============================================================================= # Provider Configuration # ============================================================================= variable "do_token" { description = "DigitalOcean API token" type = string sensitive = true } # ============================================================================= # Project Configuration # ============================================================================= variable "project_name" { description = "Project name used for resource naming" type = string default = "realms" } variable "environment" { description = "Environment name (production, staging, development)" type = string default = "production" validation { condition = contains(["production", "staging", "development"], var.environment) error_message = "Environment must be one of: production, staging, development." } } variable "region" { description = "DigitalOcean region" type = string default = "nyc3" } # ============================================================================= # VPC Configuration # ============================================================================= variable "vpc_ip_range" { description = "IP range for the VPC (CIDR notation)" type = string default = "10.10.0.0/16" } # ============================================================================= # SSH Configuration # ============================================================================= variable "admin_ssh_public_keys" { description = "Map of admin SSH public keys (name => public_key)" type = map(string) default = {} } variable "jump_host_ssh_port" { description = "SSH port for the jump host (non-standard for security)" type = number default = 49822 } variable "forgejo_ssh_port" { description = "System SSH port for Forgejo (VPC only, non-standard)" type = number default = 52913 } variable "forgejo_git_ssh_port" { description = "Git SSH port for Forgejo (public)" type = number default = 2222 } # ============================================================================= # Jump Host Configuration # ============================================================================= variable "jump_host_size" { description = "Size slug for the jump host droplet" type = string default = "s-1vcpu-512mb-10gb" } variable "jump_host_image" { description = "Image slug for the jump host droplet" type = string default = "debian-12-x64" } # ============================================================================= # Forgejo Configuration # ============================================================================= variable "forgejo_droplet_size" { description = "Size slug for the Forgejo droplet (2GB+ recommended for Actions Runner)" type = string default = "s-2vcpu-2gb-intel" } variable "forgejo_droplet_image" { description = "Image slug for the Forgejo droplet" type = string default = "debian-12-x64" } variable "forgejo_volume_size" { description = "Size of the Forgejo data volume in GB" type = number default = 50 } variable "forgejo_domain" { description = "Domain name for Forgejo (e.g., qbit.realms.pub)" type = string default = "qbit.realms.pub" } variable "manage_dns" { description = "Whether to manage DNS records via DigitalOcean" type = bool default = false } variable "dns_zone" { description = "DNS zone (base domain) managed by DigitalOcean (e.g., realms.pub)" type = string default = "realms.pub" } # ============================================================================= # Backup Configuration # ============================================================================= variable "enable_droplet_backups" { description = "Enable automated droplet backups" type = bool default = true } # ============================================================================= # Tags # ============================================================================= variable "tags" { description = "Additional tags to apply to resources" type = list(string) default = [] }