resource "hcloud_placement_group" "firewalls" { name = "firewalls" type = "spread" } resource "hcloud_placement_group" "nodes" { name = "nodes" type = "spread" } resource "hcloud_server" "opnsense_a" { name = "opnsense-a" server_type = "cpx11" image = "ubuntu-22.04" location = "ash" datacenter = "ash-dc1" keep_disk = true backups = false # ssh_keys = [ # hcloud_ssh_key.default.id # ] public_net { ipv4_enabled = true ipv4 = hcloud_primary_ip.opnsense_a_v4.id ipv6_enabled = true ipv6 = hcloud_primary_ip.opnsense_a_v6.id } firewall_ids = [ hcloud_firewall.opnsense.id ] network { network_id = hcloud_network.us_east_lan.id ip = "10.128.1.250" } network { network_id = hcloud_network.us_east_sync.id ip = "10.128.2.10" } depends_on = [ hcloud_network_subnet.lan, hcloud_network_subnet.sync ] delete_protection = true rebuild_protection = true placement_group_id = hcloud_placement_group.firewalls.id }