ipv4 only edits
This commit is contained in:
@@ -29,7 +29,7 @@ resource "proxmox_virtual_environment_vm" "this" {
|
||||
wait_for_ip {
|
||||
disabled = false
|
||||
ipv4 = true
|
||||
ipv6 = true
|
||||
ipv6 = each.value.role == "download_client" ? false : true
|
||||
}
|
||||
}
|
||||
audio_device {
|
||||
@@ -46,7 +46,7 @@ resource "proxmox_virtual_environment_vm" "this" {
|
||||
type = "x86-64-v2"
|
||||
units = 100
|
||||
}
|
||||
description = each.value.role == "container_host" ? "Arch Linux container host" : "Arch Linux download client"
|
||||
description = each.value.description
|
||||
disk {
|
||||
aio = "io_uring"
|
||||
backup = true
|
||||
@@ -61,7 +61,7 @@ resource "proxmox_virtual_environment_vm" "this" {
|
||||
size = 64
|
||||
}
|
||||
dynamic "disk" {
|
||||
for_each = each.value.role == "container_host" ? [1] : []
|
||||
for_each = each.value.role == "cluster_support" ? [1] : []
|
||||
content {
|
||||
aio = "io_uring"
|
||||
backup = true
|
||||
@@ -92,16 +92,19 @@ resource "proxmox_virtual_environment_vm" "this" {
|
||||
file_format = "raw"
|
||||
dns {
|
||||
domain = var.local_domain
|
||||
servers = concat(var.ipv4_nameservers, var.ipv6_nameservers)
|
||||
servers = each.value.role == "download_client" ? var.ipv4_nameservers : concat(var.ipv4_nameservers, var.ipv6_nameservers)
|
||||
}
|
||||
ip_config {
|
||||
ipv4 {
|
||||
address = "${data.dns_a_record_set.guests[each.key].addrs[0]}/${var.ipv4_subnet_mask}"
|
||||
gateway = var.ipv4_gateway
|
||||
}
|
||||
ipv6 {
|
||||
address = "${data.dns_aaaa_record_set.guests[each.key].addrs[0]}/64"
|
||||
gateway = var.ipv6_gateway
|
||||
dynamic "ipv6" {
|
||||
for_each = each.value.role != "download_client" ? [1] : []
|
||||
content {
|
||||
address = "${data.dns_aaaa_record_set.guests[each.key].addrs[0]}/64"
|
||||
gateway = var.ipv6_gateway
|
||||
}
|
||||
}
|
||||
}
|
||||
user_account {
|
||||
|
||||
Reference in New Issue
Block a user