pipeline-testing-improvements #9
@@ -26,18 +26,25 @@ resource "proxmox_cloud_init_disk" "ci" {
|
||||
EOT
|
||||
|
||||
# Network configuration - static IP or DHCP
|
||||
network_config = yamlencode({
|
||||
network_config = each.value.ip != null ? yamlencode({
|
||||
version = 1
|
||||
config = [{
|
||||
type = "physical"
|
||||
name = "ens18"
|
||||
subnets = each.value.ip != null ? [{
|
||||
subnets = [{
|
||||
type = "static"
|
||||
address = each.value.ip
|
||||
gateway = each.value.gateway
|
||||
dns_nameservers = split(" ", each.value.nameservers)
|
||||
dns_search = [each.value.search_domain]
|
||||
}] : [{
|
||||
}]
|
||||
}]
|
||||
}) : yamlencode({
|
||||
version = 1
|
||||
config = [{
|
||||
type = "physical"
|
||||
name = "ens18"
|
||||
subnets = [{
|
||||
type = "dhcp"
|
||||
}]
|
||||
}]
|
||||
|
||||
Reference in New Issue
Block a user