Browse Source

terraform fmt

main
Nicolas Massé 5 years ago
parent
commit
a899b31eeb
  1. 2
      centos/centos.tf
  2. 16
      coreos/coreos.tf
  3. 2
      coreos/main.tf
  4. 10
      windows/windows.tf

2
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

16
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

2
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"
}
}

10
windows/windows.tf

@ -7,10 +7,10 @@ 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"
@ -22,7 +22,7 @@ resource "libvirt_domain" "win_machine" {
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

Loading…
Cancel
Save