aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-04-08 21:18:46 +0100
committerChristopher Baines <mail@cbaines.net>2018-04-12 19:05:31 +0100
commit541f55bb1a02ab27ce0152600689a4a210347532 (patch)
tree6c8467ea25e17adda2f287e1d3e094f3bd2a4bae
parenta9fa19ff963f288908aac22e80689dd894c840b1 (diff)
downloadgovuk-mini-environment-admin-541f55bb1a02ab27ce0152600689a4a210347532.tar
govuk-mini-environment-admin-541f55bb1a02ab27ce0152600689a4a210347532.tar.gz
Improve the libvirt backend terraform config
dns and dhcp apparently need to be specified explicitly. Also change the network name to main.
-rw-r--r--terraform/libvirt/backend/main.tf12
1 files changed, 10 insertions, 2 deletions
diff --git a/terraform/libvirt/backend/main.tf b/terraform/libvirt/backend/main.tf
index 24995e0..a8f7e3c 100644
--- a/terraform/libvirt/backend/main.tf
+++ b/terraform/libvirt/backend/main.tf
@@ -10,11 +10,19 @@ provider "libvirt" {
uri = "${var.uri}"
}
-resource "libvirt_network" "vm_network" {
+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.vm_network.name}"
+ value = "${libvirt_network.main.name}"
}