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

@@ -4,13 +4,6 @@ resource "hcloud_network" "net" {
ip_range = local.net-cidr
}
// Attach the NAT to the network.
resource "hcloud_server_network" "nat-to-net" {
server_id = hcloud_server.nat.id
network_id = hcloud_network.net.id
ip = local.nat-private-ip
}
// Provide internet to the private servers, by sending all internet traffic to
// the NAT.
resource "hcloud_network_route" "gateway" {
@@ -18,9 +11,3 @@ resource "hcloud_network_route" "gateway" {
destination = "0.0.0.0/0"
gateway = local.nat-private-ip
}
// Give the NAT a public IP.
resource "hcloud_floating_ip" "master" {
type = "ipv4"
server_id = hcloud_server.nat.id
}