1
0
Fork 0
terraform-playground/three-web-hosts/network.tf

18 lines
536 B
HCL

resource "hcloud_network" "three_web_private" {
name = "three_web_private"
ip_range = var.ip_range
}
resource "hcloud_server_network" "three_web_network" {
count = length(hcloud_server.web-server)
server_id = hcloud_server.web-server[count.index].id
subnet_id = hcloud_network_subnet.three_web_private_subnet.id
}
resource "hcloud_network_subnet" "three_web_private_subnet" {
network_id = hcloud_network.three_web_private.id
type = "cloud"
network_zone = "eu-central"
ip_range = var.ip_range
}