Files
madbase/deploy/terraform/main.tf
Vlad Durnea a66d908eff
Some checks failed
CI / podman-build (push) Has been cancelled
CI / rust (push) Has been cancelled
chore: full stack stability and migration fixes, plus react UI progress
2026-03-18 09:01:38 +02:00

46 lines
833 B
HCL

terraform {
required_providers {
hcloud = {
source = "hetznercloud/hcloud"
version = "~> 1.45"
}
}
}
variable "hcloud_token" {
sensitive = true
}
variable "ssh_public_key_path" {
default = "~/.ssh/id_rsa.pub"
}
variable "location" {
default = "fsn1" # Falkenstein, Germany
}
variable "server_type" {
default = "cpx21" # 3 vCPU, 4GB RAM
}
provider "hcloud" {
token = var.hcloud_token
}
resource "hcloud_ssh_key" "default" {
name = "madbase-deploy-key"
public_key = file(var.ssh_public_key_path)
}
resource "hcloud_network" "madbase_net" {
name = "madbase-net"
ip_range = "10.0.0.0/16"
}
resource "hcloud_network_subnet" "madbase_subnet" {
network_id = hcloud_network.madbase_net.id
type = "cloud"
network_zone = "eu-central"
ip_range = "10.0.1.0/24"
}