mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-06-30 10:33:46 +00:00
* feat(vm): Add a bare minimum VM datasource * fix linter errors * fix doc * add lookup across all nodes in the cluster, add filter by tags * stable vm list * fix linter errors * pr feedback: switch to dynamic id for vms * add datasource examples * add unit tests * Update virtual_environment_vms.md
16 lines
386 B
HCL
16 lines
386 B
HCL
data "proxmox_virtual_environment_vms" "example" {
|
|
depends_on = [proxmox_virtual_environment_vm.example]
|
|
tags = ["ubuntu"]
|
|
|
|
lifecycle {
|
|
postcondition {
|
|
condition = length(self.vms) == 1
|
|
error_message = "Only 1 vm should have this tag"
|
|
}
|
|
}
|
|
}
|
|
|
|
output "proxmox_virtual_environment_vms_example" {
|
|
value = data.proxmox_virtual_environment_vms.example.vms
|
|
}
|