0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-07-04 12:32:59 +00:00
terraform-provider-proxmox/docs/data-sources/virtual_environment_vms.md
Pavel Boldyrev c2d3f46474
feat(vm): Add bare minimum VM datasource (#268)
* 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
2023-03-22 01:52:58 +00:00

35 lines
789 B
Markdown

---
layout: page
title: proxmox_virtual_environment_vms
permalink: /data-sources/virtual_environment_vms
nav_order: 18
parent: Data Sources
subcategory: Virtual Environment
---
# Data Source: proxmox_virtual_environment_vms
Retrieves information about all VMs in the Proxmox cluster.
## Example Usage
```terraform
data "proxmox_virtual_environment_vms" "ubuntu_vms" {
tags = ["ubuntu"]
}
```
## Argument Reference
- `node_name` - (Optional) The node name.
- `tags` - (Optional) A list of tags to filter the VMs. The VM must have all
the tags to be included in the result.
## Attribute Reference
- `vms` - The VMs list.
- `name` - The virtual machine name.
- `node_name` - The node name.
- `tags` - A list of tags of the VM.
- `vm_id` - The VM identifier.