-
Notifications
You must be signed in to change notification settings - Fork 114
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 filter by cluster uuid in subnet datasource #323
Add filter by cluster uuid in subnet datasource #323
Conversation
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.
Can we create a generic "filter" param so it is easy to extend it with additional parameters down the road? For example filter subnets based on VLAN ID?
This same filter logic can be applied to other data sources as well. Similar example: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami
AWS provider uses a common ec2 filter struct and transparently passes them to the SDK, thus being handled by SDK/API. An equivalent of this in Nutanix V3 APIs is the filter param in the metadata, which we already expose for list type data sources. |
Here's an example of filtering for list type data sources that I tried out for filtering by
|
8761ef4
to
285d6e0
Compare
@shreevari Can you also add an example and update the datasource documentation for this change? |
…et-datasource-filter-by-cluster-id
/ok-to-test
|
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.
Can we also add a test case for filters in data_source_nutanix_subnet_test.go?
Fixes #308