feat: added server instances

This commit is contained in:
2025-12-30 12:30:52 -05:00
parent 8d9d04810c
commit 1e17d87b4f
4 changed files with 29 additions and 13 deletions

View File

@@ -17,6 +17,28 @@ resource "hcloud_server" "nat" {
server_type = "cx23"
placement_group_id = hcloud_placement_group.group.id
ssh_keys = [hcloud_ssh_key.main.id]
network {
network_id = hcloud_network.net.id
ip = local.nat-private-ip
}
public_net {
ipv4_enabled = true
}
}
// Private compute instances.
resource "hcloud_server" "server" {
for_each = local.servers
name = each.key
image = "debian-12"
server_type = "cx23"
placement_group_id = hcloud_placement_group.group.id
ssh_keys = [hcloud_ssh_key.main.id]
network {
network_id = hcloud_network.net.id
ip = each.value
}
}