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.
23 lines
587 B
Terraform
23 lines
587 B
Terraform
output "server_ip" {
|
|
value = google_compute_address.drb.address
|
|
description = "Static external IP of the DRB server VM"
|
|
}
|
|
|
|
output "app_url" {
|
|
value = "https://app.${var.domain}"
|
|
}
|
|
|
|
output "api_url" {
|
|
value = "https://api.${var.domain}"
|
|
}
|
|
|
|
output "project_number" {
|
|
value = data.google_project.current.number
|
|
description = "GCP project number (useful for service account references)"
|
|
}
|
|
|
|
output "ssh_command" {
|
|
value = "ssh ${var.ssh_user}@${google_compute_address.drb.address}"
|
|
description = "SSH command to reach the server (should rarely be needed)"
|
|
}
|