-
Notifications
You must be signed in to change notification settings - Fork 476
Open
Open
Copy link
Labels
enhancementEnhancementEnhancement
Milestone
Description
Code of Conduct
- I have read and agree to the project's Code of Conduct.
- Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
- Do not leave "+1" or other comments that do not add relevant information or questions.
- If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Description
Currently, the vsphere_compute_cluster data source cannot filter clusters by their assigned vSphere tags. In environments with many clusters, selecting clusters based on tags such as OS, environment, or licensing is critical for automation, compliance, and operational workflows.
We propose adding a tag_filters argument to the data source that accepts a dictionary of ```` { category: name }```. The data source should return only clusters that have all specified tags in the corresponding categories.
Use Case(s)
- Selecting clusters based on environment
(env: production)to provision workloads only on clusters in a specific environment. - Filtering clusters by OS license type, exemple :
(license: windows). - Enabling reliable and safe automation workflows that depend on operational tags for cluster selection.
Potential Configuration
data "vsphere_compute_cluster" "filter_by_tags" {
tag_filters = {
"os" = "windows"
"env" = "production"
}
}
References
- vSphere REST API: https://developer.broadcom.com/xapis/vsphere-automation-api/latest/latest/
- Python PoC demonstrating tag filtering : attached to this issue
smi4th, DSO01, jmm94, chpag, quentincozette and 1 more
Metadata
Metadata
Assignees
Labels
enhancementEnhancementEnhancement