terraform-libvirt/stack/networks.tf

21 lines
503 B
Terraform
Raw Normal View History

2020-07-28 21:45:32 +00:00
# https://github.com/dmacvicar/terraform-provider-libvirt/blob/master/website/docs/r/network.markdown
resource "libvirt_network" "private_network" {
name = "private"
mode = "bridge" # "nat"
bridge = "br0" # only for bridge mode
# domain = "network.local" # only for nat mode
# addresses = [var.ip] # only for nat mode
2020-07-28 21:45:32 +00:00
autostart = true
dhcp {
enabled = true
}
2021-01-23 20:45:22 +00:00
dns {
enabled = true
local_only = true
forwarders {
address = var.dns_address
}
}
2020-07-28 21:45:32 +00:00
}