powerflex_node (Data Source)
This datasource is used to query the existing nodes from the PowerFlex array. The information fetched from this datasource can be used for getting the details / for further processing in resource block.
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 node details present on the cluster
data "powerflex_node" "example1" {
}
# Get node details using node IDs
data "powerflex_node" "example2" {
node_ids = ["Node_ID1", "Node_ID2"]
}
# Get node details using IP addresses
data "powerflex_node" "example3" {
ip_addresses = ["IP1", "IP2"]
}
# Get node details using service tags
data "powerflex_node" "example4" {
service_tags = ["Service_Tag1", "Service_Tag2"]
}
# Get node details using nodepool IDs
data "powerflex_node" "example5" {
node_pool_ids = ["NodePool_ID1", "NodePool_ID2"]
}
# Get node details using nodepool names
data "powerflex_node" "example6" {
node_pool_names = ["NodePool_Name1", "NodePool_Name2"]
}
output "node_result" {
value = data.powerflex_node.example1.node_details
}
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_node.datasource_block_name.attribute_name
where datasource_block_name is the name of the data source block and attribute_name is the attribute which user wants to fetch.
Schema
Optional
ip_addresses
(Set of String) List of node IP addressesnode_ids
(Set of String) List of node IDsnode_pool_ids
(Set of Number) List of node pool IDsnode_pool_names
(Set of String) List of node pool namesservice_tags
(Set of String) List of node service tags
Read-Only
id
(String) Placeholder attribute.node_details
(Attributes Set) Node details (see below for nested schema)
Nested Schema for node_details
Read-Only:
compliance
(String) Node compliance.compliance_check_date
(String) Compliance check date.cred_id
(String) Cred ID.current_ip_address
(String) Current IP address of the node.custom_firmware
(Boolean) Custom firmware of the node.device_group_list
(Attributes) Device group list. (see below for nested schema)device_type
(String) Device type of the node.discover_device_type
(String) Discover device type of the node.discovered_date
(String) Discovered date of the node.display_name
(String) Display name of the node.esxi_maint_mode
(Number) ESXi maintenance mode.facts
(String) Facts of the node.failures_count
(Number) Failures count.flex_os_maint_mode
(Number) FLEX OS maintenance mode.health
(String) Health of the node.health_message
(String) Health message.in_use
(Boolean) Flag specifying if node is in use.ip_address
(String) IP address of the node.managed_state
(String) Managed state of the node.manufacturer
(String) Manufacturer of the node.memory_in_gb
(Number) Memory in GB.model
(String) Model of the node.needs_attention
(Boolean) Flag specifying if node needs attention.nics
(Number) NICs of the node.number_of_cpus
(Number) Number of CPUs of the node.operating_system
(String) Operating system of the node.puppet_cert_name
(String) Puppet cert name of the node.ref_id
(String) Reference ID of the node.service_tag
(String) Service tag of the node.state
(String) State of the node.system_id
(String) System ID.
Nested Schema for node_details.device_group_list
Read-Only:
device_group
(Attributes List) Device group information. (see below for nested schema)
Nested Schema for node_details.device_group_list.device_group
Read-Only:
created_by
(String) User who created the group.created_date
(String) Creation date.group_description
(String) Group description.group_name
(String) Group name.group_seq_id
(Number) Group Sequence ID.group_user_list
(Attributes) Group user list. (see below for nested schema)updated_by
(String) User who updated the group.updated_date
(String) Updated date.
Nested Schema for node_details.device_group_list.device_group.group_user_list
Read-Only:
group_users
(Attributes List) Group user information. (see below for nested schema)total_records
(Number) Total number of records.
Nested Schema for node_details.device_group_list.device_group.group_user_list.group_users
Read-Only:
enabled
(Boolean) Enabled flag.first_name
(String) First name of the user.last_name
(String) Last name of the user.user_name
(String) User name.user_seq_id
(Number) User sequence ID.