Skip to content
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

Add filtering options to vms data source #869

Merged
merged 1 commit into from
Apr 11, 2023
Merged

Add filtering options to vms data source #869

merged 1 commit into from
Apr 11, 2023

Conversation

annakhm
Copy link
Collaborator

@annakhm annakhm commented Apr 6, 2023

VMs data source map can now be filtered by power state and operation system.

@annakhm
Copy link
Collaborator Author

annakhm commented Apr 6, 2023

/test-all

@@ -31,6 +32,8 @@ resource "nsxt_policy_vm_tags" "test" {
## Argument Reference

* `value_tupe` - (Optional) Type of VM ID the user is interested in. Possible values are `bios_id`, `external_id`, `instance_id`. Default is `bios_id`.
* `state` - (Optional) Filter results by power state of the machine.
* `os` - (Optional) Filter results by operating system of the machine. The match is case insensitive and prefix-based.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this os or guest_os?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, fixed

@@ -15,6 +15,7 @@ This data source is applicable to NSX Policy Manager and VMC.

```hcl
data "nsxt_policy_vms" "all" {
state = "running"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to also add guest_os to the example template here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added that as well

VMs data source map can now be filtered by power state and
operation system.

Signed-off-by: Anna Khmelnitsky <[email protected]>
@annakhm annakhm linked an issue Apr 11, 2023 that may be closed by this pull request
@annakhm
Copy link
Collaborator Author

annakhm commented Apr 11, 2023

/test-all

Copy link
Collaborator

@ksamoray ksamoray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@annakhm annakhm merged commit 3a5fe2a into master Apr 11, 2023
@annakhm annakhm deleted the vms-filters branch August 2, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add additional filters to nsxt_policy_vms data source
3 participants