33700448bf
Provisions e2-micro VM (us-east1-b, free tier) with static IP, SSH and web firewall rules, Docker + Caddy startup script, and IAM bindings for Firestore and GCS access via ADC. Imports existing drb-calls bucket and c2-server Firestore database into state. Ansible roles handle first-time setup (swap, docker group) and all subsequent deploys via rsync + docker compose, with secrets managed via Ansible Vault. DNS stays on AWS Route 53.
67 lines
1.5 KiB
Terraform
67 lines
1.5 KiB
Terraform
variable "project_id" {
|
|
description = "GCP project ID"
|
|
type = string
|
|
}
|
|
|
|
variable "region" {
|
|
description = "GCP region"
|
|
type = string
|
|
default = "us-central1"
|
|
}
|
|
|
|
variable "zone" {
|
|
description = "GCP zone"
|
|
type = string
|
|
default = "us-central1-a"
|
|
}
|
|
|
|
variable "domain" {
|
|
description = "Base domain (e.g. example.com)"
|
|
type = string
|
|
}
|
|
|
|
variable "machine_type" {
|
|
description = "Compute Engine machine type"
|
|
type = string
|
|
default = "e2-small"
|
|
}
|
|
|
|
variable "ssh_user" {
|
|
description = "SSH username for the VM"
|
|
type = string
|
|
default = "drb"
|
|
}
|
|
|
|
variable "ssh_public_key" {
|
|
description = "SSH public key to authorize on the VM"
|
|
type = string
|
|
}
|
|
|
|
variable "allowed_ssh_cidrs" {
|
|
description = "CIDR ranges allowed to SSH to the VM (your IP + Gitea runner)"
|
|
type = list(string)
|
|
}
|
|
|
|
variable "audio_bucket_name" {
|
|
description = "Existing GCS bucket name for call audio recordings"
|
|
type = string
|
|
}
|
|
|
|
variable "audio_bucket_location" {
|
|
description = "GCS bucket location — must match the existing bucket's location exactly"
|
|
type = string
|
|
default = "US-CENTRAL1"
|
|
}
|
|
|
|
variable "firestore_database" {
|
|
description = "Firestore database ID (e.g. c2-server)"
|
|
type = string
|
|
default = "c2-server"
|
|
}
|
|
|
|
variable "firestore_location" {
|
|
description = "Firestore multi-region location (nam5 = us-central, eur3 = europe)"
|
|
type = string
|
|
default = "nam5"
|
|
}
|