From a899b31eebb0a063f4b1514b119287e2c1d25dfb Mon Sep 17 00:00:00 2001 From: Nicolas MASSE Date: Sun, 4 Apr 2021 14:41:34 +0200 Subject: [PATCH] terraform fmt --- centos/centos.tf | 2 +- coreos/coreos.tf | 16 ++++++++-------- coreos/main.tf | 2 +- windows/windows.tf | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/centos/centos.tf b/centos/centos.tf index 309f32c..6ca54b3 100644 --- a/centos/centos.tf +++ b/centos/centos.tf @@ -34,7 +34,7 @@ resource "libvirt_domain" "centos_machine" { network_interface { network_id = libvirt_network.lab_net.id - hostname = format(var.centos_hostname_format, count.index + 1) + hostname = format(var.centos_hostname_format, count.index + 1) # When creating the domain resource, wait until the network interface gets # a DHCP lease from libvirt, so that the computed IP addresses will be diff --git a/coreos/coreos.tf b/coreos/coreos.tf index 12acf72..9bb9d31 100644 --- a/coreos/coreos.tf +++ b/coreos/coreos.tf @@ -11,8 +11,8 @@ data "ignition_config" "startup" { } data "ignition_file" "hostname" { - path = "/etc/hostname" - mode = 420 # decimal 0644 + path = "/etc/hostname" + mode = 420 # decimal 0644 content { content = format(var.coreos_hostname_format, count.index + 1) @@ -46,12 +46,12 @@ resource "libvirt_ignition" "ignition" { } resource "libvirt_domain" "coreos_machine" { - count = var.coreos_machine_count - name = format(var.coreos_hostname_format, count.index + 1) - vcpu = "1" - memory = "1024" + count = var.coreos_machine_count + name = format(var.coreos_hostname_format, count.index + 1) + vcpu = "1" + memory = "1024" coreos_ignition = element(libvirt_ignition.ignition.*.id, count.index) - autostart = true + autostart = true disk { volume_id = element(libvirt_volume.coreos_disk.*.id, count.index) @@ -65,7 +65,7 @@ resource "libvirt_domain" "coreos_machine" { network_interface { network_id = libvirt_network.lab_net.id - hostname = format(var.coreos_hostname_format, count.index + 1) + hostname = format(var.coreos_hostname_format, count.index + 1) # When creating the domain resource, wait until the network interface gets # a DHCP lease from libvirt, so that the computed IP addresses will be diff --git a/coreos/main.tf b/coreos/main.tf index 2ee684d..538f786 100644 --- a/coreos/main.tf +++ b/coreos/main.tf @@ -14,7 +14,7 @@ terraform { version = ">=2.2.0" } ignition = { - source = "community-terraform-providers/ignition" + source = "community-terraform-providers/ignition" version = "2.1.2" } } diff --git a/windows/windows.tf b/windows/windows.tf index d94e775..cf628e4 100644 --- a/windows/windows.tf +++ b/windows/windows.tf @@ -7,22 +7,22 @@ resource "libvirt_volume" "win_disk" { } resource "libvirt_domain" "win_machine" { - count = var.windows_machine_count - name = format(var.windows_hostname_format, count.index + 1) - vcpu = "2" - memory = "2048" + count = var.windows_machine_count + name = format(var.windows_hostname_format, count.index + 1) + vcpu = "2" + memory = "2048" cpu = { mode = "host-passthrough" } - + disk { volume_id = element(libvirt_volume.win_disk.*.id, count.index) } network_interface { network_id = libvirt_network.lab_net.id - hostname = format(var.windows_hostname_format, count.index + 1) + hostname = format(var.windows_hostname_format, count.index + 1) # When creating the domain resource, wait until the network interface gets # a DHCP lease from libvirt, so that the computed IP addresses will be