Initial commit - realms platform

This commit is contained in:
doomtube 2026-01-05 22:54:27 -05:00
parent c590ab6d18
commit c717c3751c
234 changed files with 74103 additions and 15231 deletions

135
terraform/variables.tf Normal file
View file

@ -0,0 +1,135 @@
# =============================================================================
# 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 (reference existing VPC)
# =============================================================================
variable "vpc_uuid" {
description = "UUID of the existing VPC (from terraform/ outputs)"
type = string
}
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 "app_ssh_port" {
description = "SSH port for the app server (VPC only, non-standard)"
type = number
default = 51234
}
# =============================================================================
# App Server Configuration
# =============================================================================
variable "app_droplet_size" {
description = "Size slug for the app server droplet"
type = string
default = "s-2vcpu-4gb"
}
variable "app_droplet_image" {
description = "Image slug for the app server droplet"
type = string
default = "debian-12-x64"
}
variable "app_domain" {
description = "Domain name for the app (e.g., realms.pub)"
type = string
default = "realms.pub"
}
# =============================================================================
# DNS Configuration
# =============================================================================
variable "manage_dns" {
description = "Whether to manage DNS records via DigitalOcean"
type = bool
default = true
}
variable "dns_zone" {
description = "DNS zone (base domain) managed by DigitalOcean"
type = string
default = "realms.pub"
}
# =============================================================================
# Backup Configuration
# =============================================================================
variable "enable_droplet_backups" {
description = "Enable automated droplet backups"
type = bool
default = false
}
# =============================================================================
# Tags
# =============================================================================
variable "tags" {
description = "Additional tags to apply to resources"
type = list(string)
default = []
}
# =============================================================================
# Forgejo Registry Configuration
# =============================================================================
variable "forgejo_registry" {
description = "Forgejo container registry URL"
type = string
default = "qbit.realms.pub"
}