Terraform-IaC/template/hetzner-infra/network.tf

15 lines
373 B
Terraform
Raw Normal View History

2023-07-09 17:05:29 +01:00
resource "hcloud_network" "network" {
name = "vnet-${var.project_name}"
ip_range = "10.0.0.0/16"
labels = merge(
local.common_labels,
{ "Resource_Type" = "Virtual_Network" }
)
}
resource "hcloud_network_subnet" "subnet" {
network_id = hcloud_network.network.id
type = "cloud"
ip_range = "10.0.1.0/24"
network_zone = "eu-central"
}