powerflex_nvme_host (Data Source)
This datasource is used to query the existing NVMe hosts from the PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.
Note: NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this datasource is not supported in PowerFlex 3.x.
Example Usage
/*
Copyright (c) 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
# Get all NVMe host details present on the cluster
data "powerflex_nvme_host" "example1" {
}
// 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/
// Please note that NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this datasource is not supported in PowerFlex 3.x.
data "powerflex_nvme_host" "example2" {
filter {
name = ["name1", "name2"]
# id = ["ID1", "ID2"]
# nqn = ["NQN1", "NQN2"]
# max_num_paths = [2]
# max_num_sys_ports = [10]
# system_id = ["systemID"]
}
}
output "nvme_host_result" {
value = data.powerflex_nvme_host.example1
}
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_nvme_host.example1.datasource_block_name.attribute_name
where attribute_name is the attribute which user wants to fetch.
Schema
Optional
filter
(Block, Optional) (see below for nested schema)
Read-Only
id
(String) ID of the NVMe hosts Datasourcenvme_host_details
(Attributes List) List of NVMe hosts (see below for nested schema)
Nested Schema for filter
Optional:
id
(Set of String) List of idmax_num_paths
(Set of Number) List of max_num_pathsmax_num_sys_ports
(Set of Number) List of max_num_sys_portsname
(Set of String) List of namenqn
(Set of String) List of nqnsystem_id
(Set of String) List of system_id
Nested Schema for nvme_host_details
Read-Only:
id
(String) ID of the NVMe hostlinks
(Attributes List) Specifies the links associated with NVMe host. (see below for nested schema)max_num_paths
(Number) Number of Paths Per Volume.max_num_sys_ports
(Number) Number of System Ports per Protection Domain.name
(String) Name of the NVMe hostnqn
(String) NQN of the NVMe host.system_id
(String) The ID of the system.
Nested Schema for nvme_host_details.links
Read-Only:
href
(String) Specifies the exact path to fetch the details.rel
(String) Specifies the relationship with the NVMe host.