add tag to the VMs based on a variable
This commit is contained in:
@@ -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 {
|
||||
|
@@ -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"
|
||||
}
|
Reference in New Issue
Block a user