aboutsummaryrefslogtreecommitdiff
path: root/terraform/libvirt/backend/main.tf
blob: a8f7e3ca36f1d0e66e29b41bd9718c0764f8e4e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
variable "uri" {
  type = "string"
}

terraform {
  backend "http" {}
}

provider "libvirt" {
  uri = "${var.uri}"
}

resource "libvirt_network" "main" {
  name = "vm_network"
  addresses = ["10.0.1.0/24"]

  dhcp {
    enabled = true
  }

  dns {
    local_only = true
  }
}

output "network_name" {
  value = "${libvirt_network.main.name}"
}