add tag to the VMs based on a variable

This commit is contained in:
2025-04-06 19:16:11 +00:00
parent bc64652310
commit db31372abb
4 changed files with 9 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ module "pve_vm" {
vm_cpu = each.value.vm_cpu
vm_ram = each.value.vm_ram
vm_vlan = each.value.vm_vlan
vm_tags = [var.vm_env]
}
locals {

View File

@@ -31,4 +31,10 @@ variable "vm_attr" {
default = {
"vm" = { ram = 2048, cpu = 2, vlan = 66 }
}
}
variable "vm_env" {
description = "VM environment"
type = string
default = "test"
}