|
|
@ -34,11 +34,11 @@ resource "libvirt_volume" "lb_disk" { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
resource "libvirt_domain" "lb" { |
|
|
resource "libvirt_domain" "lb" { |
|
|
name = local.lb_name |
|
|
name = local.lb_name |
|
|
vcpu = var.lb_vcpu |
|
|
vcpu = var.lb_vcpu |
|
|
memory = var.lb_memory_size |
|
|
memory = var.lb_memory_size |
|
|
cloudinit = libvirt_cloudinit_disk.lb_cloudinit.id |
|
|
cloudinit = libvirt_cloudinit_disk.lb_cloudinit.id |
|
|
autostart = false |
|
|
autostart = false |
|
|
qemu_agent = true |
|
|
qemu_agent = true |
|
|
|
|
|
|
|
|
cpu = { |
|
|
cpu = { |
|
|
@ -56,9 +56,9 @@ resource "libvirt_domain" "lb" { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
network_interface { |
|
|
network_interface { |
|
|
network_id = libvirt_network.ocp_net.id |
|
|
network_id = libvirt_network.ocp_net.id |
|
|
addresses = [cidrhost(var.network_ip_range, 4)] |
|
|
addresses = [cidrhost(var.network_ip_range, 4)] |
|
|
hostname = "lb" |
|
|
hostname = "lb" |
|
|
|
|
|
|
|
|
# When creating the domain resource, wait until the network interface gets |
|
|
# When creating the domain resource, wait until the network interface gets |
|
|
# a DHCP lease from libvirt, so that the computed IP addresses will be |
|
|
# a DHCP lease from libvirt, so that the computed IP addresses will be |
|
|
@ -67,8 +67,8 @@ resource "libvirt_domain" "lb" { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
network_interface { |
|
|
network_interface { |
|
|
bridge = var.external_ifname |
|
|
bridge = var.external_ifname |
|
|
mac = var.external_mac_address |
|
|
mac = var.external_mac_address |
|
|
|
|
|
|
|
|
# When creating the domain resource, wait until the network interface gets |
|
|
# When creating the domain resource, wait until the network interface gets |
|
|
# a DHCP lease from libvirt, so that the computed IP addresses will be |
|
|
# a DHCP lease from libvirt, so that the computed IP addresses will be |
|
|
|