-
-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(vm): implement filtering in vms data source. #1423
Conversation
Trying to implement filtering in I'm not satisfied with the result, because:
data "proxmox_virtual_environment_vms" "ubuntu_templates" {
filter {
name = "tags"
values = ["template", "latest"] # also logic here will be AND, instead of OR in the PR
}
filter {
name = "node_name"
values = ["^proxmox-node-(1|2|3)$"]
}
}
|
is the in regards to /cluster/resources; yes i think it should be fine (not sure if proxmox 7 and below has the same api calls) - worst case scenario for supporting both would be choosing a path based on |
I think regex only is fine, if this behavior is clearly documented. One can always use
PVE 7.x is not officially supported by the provider, and I think some features are not working in 7.x anymore (like creating a VM disk from an image). I don't really like to put extra effort into maintaining 7.x compatibility, to be honest. |
I would say, mark the top level
Go for it! 🙂 I probably just didn't think about the cluster API when implementing this datasource. |
Okay! Trying to implement all suggestions.
|
* Additional attributes for vm data source (status, template) Signed-off-by: Konstantin Kornienko <[email protected]>
Signed-off-by: Pavel Boldyrev <[email protected]> Signed-off-by: Konstantin Kornienko <[email protected]>
Signed-off-by: Konstantin Kornienko <[email protected]>
Signed-off-by: Konstantin Kornienko <[email protected]>
….8) (bpg#1425) | datasource | package | from | to | | ----------- | ----------------------- | --------- | --------- | | github-tags | JetBrains/qodana-action | v2024.1.5 | v2024.1.8 | Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Konstantin Kornienko <[email protected]>
12fb8cf
to
d157161
Compare
Signed-off-by: Konstantin Kornienko <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@konstantin-kornienko Thanks a lot for putting this together! It's a great improvement for the datasource!
LGTM! 🚀
@all-contributors please add @konstantin-kornienko for code, ideas |
I've put up a pull request to add @konstantin-kornienko! 🎉 |
Contributor's Note
/docs
for any user-facing features or additions./fwprovider/tests
for any new or updated resources / data sources.make example
to verify that the change works as expected.Proof of Work
Community Note
Relates #1010