title | linkTitle | page_title | subcategory | description |
---|---|---|---|---|
powerflex_sdc data source |
powerflex_sdc |
powerflex_sdc Data Source - powerflex |
This datasource is used to query the existing Storage Data Clients from the PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block. |
This datasource is used to query the existing Storage Data Clients from the PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.
/*
Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved.
Licensed under the Mozilla Public License Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://mozilla.org/MPL/2.0/
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
# commands to run this tf file : terraform init && terraform apply --auto-approve
data "powerflex_sdc" "all" {
}
# Returns all sdcs
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/
data "powerflex_sdc" "filtered" {
filter {
# id = ["ID1", "ID2"]
# system_id = ["systemID", "systemID2"]
# sdc_ip = ["SCDIP1", "SCDIP2"]
# sdc_approved = false
# on_vmware = false
# sdc_guid = ["SdcGUID1", "SdcGUID2"]
# mdm_connection_state = ["MdmConnectionState1", "MdmConnectionState2"]
# name = ["Name1", "Name2"]
}
}
# Returns filtered sdcs matching criteria
output "filteredsdcresult" {
value = data.powerflex_sdc.filtered.sdcs
}
# -----------------------------------------------------------------------------------
After the successful execution of above said block, We can see the output by executing terraform output
command. Also, we can fetch information via the variable: data.powerflex_sdc.selected.attribute_name
where attribute_name is the attribute which user wants to fetch.
filter
(Block, Optional) (see below for nested schema)
id
(String) ID placeholder for sdc datasourcesdcs
(Attributes List) List of fetched SDCs. (see below for nested schema)
Optional:
id
(Set of String) List of idmdm_connection_state
(Set of String) List of mdm_connection_statename
(Set of String) List of nameon_vmware
(Boolean) Value for on_vmwaresdc_approved
(Boolean) Value for sdc_approvedsdc_guid
(Set of String) List of sdc_guidsdc_ip
(Set of String) List of sdc_ipsystem_id
(Set of String) List of system_id
Read-Only:
id
(String) The ID of the fetched SDC.links
(Attributes List) The Links of the fetched SDC. (see below for nested schema)mdm_connection_state
(String) The MDM connection status of the fetched SDC.name
(String) The name of the fetched SDC.on_vmware
(Boolean) If the fetched SDC is on vmware.sdc_approved
(Boolean) If the fetched SDC is approved.sdc_guid
(String) The GUID of the fetched SDC.sdc_ip
(String) The IP of the fetched SDC.system_id
(String) The System ID of the fetched SDC.
Read-Only:
href
(String) The Links-HREF of the fetched SDC.rel
(String) The Links-Rel of the fetched SDC.