mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-opentofu-private.git
synced 2025-10-27 15:53:06 +00:00
Update proxmox.tf
This commit is contained in:
27
proxmox.tf
27
proxmox.tf
@ -47,18 +47,25 @@ resource "proxmox_virtual_environment_file" "vm_user_data" {
|
|||||||
source_raw {
|
source_raw {
|
||||||
file_name = "cloud-init-iac-k8s-${each.key}.yaml"
|
file_name = "cloud-init-iac-k8s-${each.key}.yaml"
|
||||||
data = yamlencode(
|
data = yamlencode(
|
||||||
local.deep_merge(
|
merge(
|
||||||
[
|
yamldecode(file("${path.module}/cloud-init-base.yaml")),
|
||||||
yamldecode(file("${path.module}/cloud-init-base.yaml")),
|
{
|
||||||
yamldecode(templatefile("${path.module}/cloud-init-vm.yaml.tftpl", {
|
packages = concat(
|
||||||
extra_packages = try(each.value.extra_packages, []),
|
try(yamldecode(file("${path.module}/cloud-init-base.yaml")).packages, []),
|
||||||
extra_users = try(each.value.extra_users, []),
|
try(each.value.extra_packages, [])
|
||||||
extra_runcmd = try(each.value.extra_runcmd, []),
|
),
|
||||||
}))
|
users = concat(
|
||||||
]
|
try(yamldecode(file("${path.module}/cloud-init-base.yaml")).users, []),
|
||||||
|
try(each.value.extra_users, [])
|
||||||
|
),
|
||||||
|
runcmd = concat(
|
||||||
|
try(yamldecode(file("${path.module}/cloud-init-base.yaml")).runcmd, []),
|
||||||
|
try(each.value.extra_runcmd, [])
|
||||||
|
)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
locals {
|
locals {
|
||||||
|
|||||||
Reference in New Issue
Block a user