feat: provisioned

This commit is contained in:
2025-12-22 12:26:40 -05:00
parent 3e07d115c0
commit 7a4efbbe50
5 changed files with 58 additions and 25 deletions

16
terraform/main.tf Normal file
View File

@@ -0,0 +1,16 @@
resource "hcloud_ssh_key" "key" {
name = "kthw-key"
public_key = file(var.public_key_file)
}
resource "hcloud_server" "boxes" {
for_each = var.boxes
name = each.value
image = "debian-12"
ssh_keys = [hcloud_ssh_key.key.id]
server_type = "cx23"
public_net {
ipv4_enabled = true
ipv6_enabled = false
}
}

View File

@@ -1,3 +1,3 @@
output "name" {
output "box-ip" {
value = {for box in hcloud_server.boxes: box.name => box.ipv4_address}
}

View File

@@ -1,4 +1,13 @@
variable "hcloud_token" {
sensitive = true
type = string
}
variable "public_key_file" {
type = string
sensitive = true
}
variable "boxes" {
type = set(string)
}