Add filter by cluster uuid in subnet datasource#323
Conversation
yannickstruyf3
left a comment
There was a problem hiding this comment.
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
|
yannickstruyf3
left a comment
There was a problem hiding this comment.
Can we also add a test case for filters in data_source_nutanix_subnet_test.go?
Fixes #308