feat: terraform + ansible config to provision a host on hetzner & set cloudflare DNS
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
variable "project_name" {
|
||||
type = string
|
||||
description = "VM name"
|
||||
}
|
||||
|
||||
variable "ssh_public_key" {
|
||||
type = string
|
||||
description = "Public SSH key to install on the VM"
|
||||
}
|
||||
|
||||
## HETZNER
|
||||
variable "hcloud_token" {
|
||||
type = string
|
||||
description = "Hetzner Cloud API token"
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "hcloud_server_type" {
|
||||
type = string
|
||||
description = "Hetzner Cloud server type"
|
||||
default = "cx22" # 2 vCPU / 4 GB RAM / 40 GB NVMe
|
||||
}
|
||||
|
||||
variable "hcloud_image" {
|
||||
type = string
|
||||
description = "OS image name to boot the VPS from"
|
||||
default = "debian-13"
|
||||
}
|
||||
|
||||
variable "hcloud_location" {
|
||||
type = string
|
||||
description = "Hetzner Cloud location"
|
||||
default = "nbg1" # Nuremberg, Germany
|
||||
}
|
||||
|
||||
## CLOUDFLARE
|
||||
variable "cloudflare_api_token" {
|
||||
type = string
|
||||
description = "Cloudflare API token with Zone.DNS edit permission"
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "domain_name" {
|
||||
type = string
|
||||
description = "Cloudflare zone (apex domain) in which to create the A record"
|
||||
}
|
||||
|
||||
variable "record_name" {
|
||||
type = string
|
||||
description = "DNS record name relative to the zone; use \"@\" for the apex"
|
||||
default = "dokploy"
|
||||
}
|
||||
|
||||
variable "cloudflare_proxied" {
|
||||
type = bool
|
||||
description = "Whether Cloudflare should proxy (orange-cloud) the A record"
|
||||
default = true
|
||||
}
|
||||
Reference in New Issue
Block a user