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

Added Regex Filter to datasource filtering #273

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/data-sources/compliance_report_resource_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ limitations under the License.
data "powerflex_compliance_report_resource_group" "example1" {
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_compliance_report_resource_group" "compliance_report_resource_group_filter_regex" {
# filter{
# name = ["^System_.*$"]
# model = ["^Powerflex.*$"]
# }
# }

# output "complianceReportResourceGroupFilterRegexResult"{
# value = data.powerflex_compliance_report_resource_group.compliance_report_resource_group_filter_regex.compliance_reports
# }

# this datasource supports multiple filters like ip_address, host_name, service_tag, compliant,etc.
# Note: If both filters are used simultaneously, the results will include any records that match either of the filters.
# data "powerflex_compliance_report_resource_group" "complianceReport" {
Expand All @@ -72,7 +84,7 @@ data "powerflex_compliance_report_resource_group" "example1" {
# }

output "result" {
value = data.powerflex_compliance_report_resource_group.example1
value = data.powerflex_compliance_report_resource_group.example1.compliance_reports
}
```

Expand Down
12 changes: 12 additions & 0 deletions docs/data-sources/device.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@ output "deviceResult" {
value = data.powerflex_device.all.device_model
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_device" "device_filter_regex" {
# filter{
# name = ["^System_.*$"]
# temperature_state = ["^.*Failed$"]
# }
# }

# output "faultSetFilterRegexResult"{
# value = data.powerflex_device.device_filter_regex.device_model
# }

// If multiple filter fields are provided then it will show the intersection of all of those fields.
// If there is no intersection between the filters then an empty datasource will be returned
// For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples/
Expand Down
12 changes: 12 additions & 0 deletions docs/data-sources/fault_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@ output "fault_set_result_all" {
value = data.powerflex_fault_set.all.fault_set_details
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_fault_set" "fault_set_filter_regex" {
# filter{
# name = ["^System_.*$"]
# id = ["^.*0f$"]
# }
# }

# output "faultSetFilterRegexResult"{
# value = data.powerflex_fault_set.fault_set_filter_regex.fault_set_details
# }

// If multiple filter fields are provided then it will show the intersection of all of those fields.
// If there is no intersection between the filters then an empty datasource will be returned
// For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples/
Expand Down
12 changes: 12 additions & 0 deletions docs/data-sources/firmware_repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ output "powerflex_firmware_repository_all_result" {
value = data.powerflex_firmware_repository.all.firmware_repository_details
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_firmware_repository" "firmware_repository_filter_regex" {
# filter{
# name = ["^System_.*$"]
# disk_location = ["^https://powerflex.*$"]
# }
# }

# output "firmwareRepositoryFilterRegexResult"{
# value = data.powerflex_firmware_repository.firmware_repository_filter_regex.firmware_repository_details
# }

// If multiple filter fields are provided then it will show the intersection of all of those fields.
// If there is no intersection between the filters then an empty datasource will be returned
// For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples/
Expand Down
12 changes: 12 additions & 0 deletions docs/data-sources/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ limitations under the License.
data "powerflex_node" "example1" {
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_node" "node_filter_regex" {
# filter{
# name = ["^System_.*$"]
# manufacturer = ["^.*Corp.*$"]
# }
# }

# output "nodeFilterRegexResult"{
# value = data.powerflex_node.node_filter_regex.node_details
# }

// If multiple filter fields are provided then it will show the intersection of all of those fields.
// If there is no intersection between the filters then an empty datasource will be returned
// For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples/
Expand Down
15 changes: 14 additions & 1 deletion docs/data-sources/nvme_host.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ limitations under the License.
data "powerflex_nvme_host" "example1" {
}


# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_nvme_host" "nvme_host_filter_regex" {
# filter{
# name = ["^System_.*$"]
# system_id = ["^.*0f$"]
# }
# }

# output "nvmeHostFilterRegexResult"{
# value = data.powerflex_nvme_host.nvme_host_filter_regex.nvme_host_details
# }

// If multiple filter fields are provided then it will show the intersection of all of those fields.
// If there is no intersection between the filters then an empty datasource will be returned
// For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples/
Expand All @@ -72,7 +85,7 @@ data "powerflex_nvme_host" "example2" {
}

output "nvme_host_result" {
value = data.powerflex_nvme_host.example1
value = data.powerflex_nvme_host.example1.nvme_host_details
}
```

Expand Down
14 changes: 13 additions & 1 deletion docs/data-sources/nvme_target.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ limitations under the License.
data "powerflex_nvme_target" "example1" {
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_nvme_target" "nvme_target_filter_regex" {
# filter{
# name = ["^System_.*$"]
# software_version_info = ["^R4_5.*$"]
# }
# }

# output "nvmeTargetFilterRegexResult"{
# value = data.powerflex_nvme_target.nvme_target_filter_regex.nvme_target_details
# }

// If multiple filter fields are provided then it will show the intersection of all of those fields.
// If there is no intersection between the filters then an empty datasource will be returned
// For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples/
Expand All @@ -81,7 +93,7 @@ data "powerflex_nvme_target" "example" {
}

output "nvme_target_result" {
value = data.powerflex_nvme_target.example
value = data.powerflex_nvme_target.example.nvme_target_details
}
```

Expand Down
14 changes: 13 additions & 1 deletion docs/data-sources/os_repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ limitations under the License.
data "powerflex_os_repository" "example1" {
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_os_repository" "os_repository_filter_regex" {
# filter{
# name = ["^System_.*$"]
# source_path = ["^c://.*$"]
# }
# }

# output "osRepositoryFilterRegexResult"{
# value = data.powerflex_os_repository.os_repository_filter_regex.os_repositories
# }

# # Get OS Repository details by ID
# data "powerflex_os_repository" "example2" {
# # this datasource supports filters like os repsoitory id, name, source path, etc.
Expand Down Expand Up @@ -84,7 +96,7 @@ data "powerflex_os_repository" "example1" {
# }

output "os_repository_result" {
value = data.powerflex_os_repository.example1
value = data.powerflex_os_repository.example1.os_repositories
}
```

Expand Down
14 changes: 13 additions & 1 deletion docs/data-sources/peer_system.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ limitations under the License.
data "powerflex_peer_system" "example1" {
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_peer_system" "peer_system_filter_regex" {
# filter{
# name = ["^System_.*$"]
# perf_profile = ["^.*Performance$"]
# }
# }

# output "peerSystemFilterRegexResult"{
# value = data.powerflex_peer_system.peer_system_filter_regex.peer_system_details
# }

# Get Peer System details using filter with all values
# If there is no intersection between the filters then an empty datasource will be returned
# For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples
Expand All @@ -72,7 +84,7 @@ data "powerflex_peer_system" "example1" {
# }

output "peer_system_result" {
value = data.powerflex_peer_system.example1
value = data.powerflex_peer_system.example1.peer_system_details
}
```

Expand Down
13 changes: 13 additions & 0 deletions docs/data-sources/protection_domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ output "inputAll" {
value = data.powerflex_protection_domain.all.protection_domains
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_protection_domain" "protection_domain_filter_regex" {
# filter{
# name = ["^System_.*$"]
# rf_cache_opertional_mode = ["^.*Write.*$"]
# }
# }

# output "protectionDomainFilterRegexResult"{
# value = data.powerflex_protection_domain.protection_domain_filter_regex.protection_domains
# }


# Get Peer System details using filter with all values
# If there is no intersection between the filters then an empty datasource will be returned
# For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples
Expand Down
13 changes: 13 additions & 0 deletions docs/data-sources/replication_consistency_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ output "rcgResult" {
value = data.powerflex_replication_consistency_group.rcg
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_replication_consistency_group" "rcg_filter_regex" {
# filter{
# name = ["^System_.*$"]
# target_volume_access_mode = ["^.*Access$"]
# }
# }

# output "rcgFilterRegexResult"{
# value = data.powerflex_replication_consistency_group.rcg_filter_regex.rcg_filter
# }


// If multiple filter fields are provided then it will show the intersection of all of those fields.
// If there is no intersection between the filters then an empty datasource will be returned
// For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples/
Expand Down
12 changes: 12 additions & 0 deletions docs/data-sources/replication_pair.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ output "rpResult" {
value = data.powerflex_replication_pair.rp
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_replication_pair" "replication_pair_filter_regex" {
# filter{
# name = ["^System_.*$"]
# peer_system_name = ["^Peer_System_.*$"]
# }
# }

# output "replicationPairFilterRegexResult"{
# value = data.powerflex_replication_pair.replication_pair_filter_regex.rp_filter
# }

// If multiple filter fields are provided then it will show the intersection of all of those fields.
// If there is no intersection between the filters then an empty datasource will be returned
// For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples/
Expand Down
13 changes: 13 additions & 0 deletions docs/data-sources/resource_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,19 @@ limitations under the License.
data "powerflex_resource_group" "example1" {
}


# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_resource_group" "resource_group_filter_regex" {
# filter{
# name = ["^System_.*$"]
# deployment_finished_date = ["^2024-01-10.*$"]
# }
# }

# output "resourceGroupFilterRegexResult"{
# value = data.powerflex_resource_group.resource_group_filter_regex.resource_group_details
# }

// If multiple filter fields are provided then it will show the intersection of all of those fields.
// If there is no intersection between the filters then an empty datasource will be returned
// For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples/
Expand Down
14 changes: 13 additions & 1 deletion docs/data-sources/sdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ output "allsdcresult" {
value = data.powerflex_sdc.all
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_sdc" "sdc_filter_regex" {
# filter{
# name = ["^System_.*$"]
# system_id = ["^.*0f$"]
# }
# }

# output "sdcFilterRegexResult"{
# value = data.powerflex_sdc.sdc_filter_regex.sdcs
# }

// If multiple filter fields are provided then it will show the intersection of all of those fields.
// If there is no intersection between the filters then an empty datasource will be returned
// For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples/
Expand All @@ -75,7 +87,7 @@ data "powerflex_sdc" "filtered" {

# Returns filtered sdcs matching criteria
output "filteredsdcresult" {
value = data.powerflex_sdc.filtered
value = data.powerflex_sdc.filtered.sdcs
}
# -----------------------------------------------------------------------------------
```
Expand Down
14 changes: 13 additions & 1 deletion docs/data-sources/sds.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ limitations under the License.
data "powerflex_sds" "example1" {
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_sds" "sds_filter_regex" {
# filter{
# name = ["^System_.*$"]
# maintenance_type = ["^.*Maintenance$"]
# }
# }

# output "sdsFilterRegexResult"{
# value = data.powerflex_sds.sds_filter_regex.sds_details
# }

# Get Sds details using filter with all values
# If there is no intersection between the filters then an empty datasource will be returned
# For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples
Expand Down Expand Up @@ -96,7 +108,7 @@ data "powerflex_sds" "example1" {
# }

output "allsdcresult" {
value = data.powerflex_sds.example1
value = data.powerflex_sds.example1.sds_details
}
```

Expand Down
12 changes: 12 additions & 0 deletions docs/data-sources/snapshot_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ limitations under the License.
data "powerflex_snapshot_policy" "sp" {
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_snapshot_policy" "snapshot_policy_filter_regex" {
# filter{
# name = ["^System_.*$"]
# system_id = ["^.*0f$"]
# }
# }

# output "snapshotPolicyFilterRegexResult"{
# value = data.powerflex_snapshot_policy.snapshot_policy_regex.sp
# }

// If multiple filter fields are provided then it will show the intersection of all of those fields.
// If there is no intersection between the filters then an empty datasource will be returned
// For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples/
Expand Down
13 changes: 13 additions & 0 deletions docs/data-sources/storage_pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ output "storagePoolallresult" {
value = data.powerflex_storage_pool.all.storage_pools
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_storage_pool" "storage_pool_filter_regex" {
# filter{
# name = ["^System_.*$"]
# rebuild_io_priority_policy = ["^limit.*$"]
# }
# }

# output "storagePoolFilterRegexResult"{
# value = data.powerflex_storage_pool.storage_pool_regex.storage_pools
# }


# Get Peer System details using filter with all values
# If there is no intersection between the filters then an empty datasource will be returned
# For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples
Expand Down
Loading
Loading