powermax_hostgroup data source
powermax_hostgroup (Data Source)
Data source for reading HostGroups in PowerMax array. PowerMax host groups are groups of PowerMax Hosts. see the host example for more information on hosts.
Example Usage
/*
Copyright (c) 2023 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.
*/
# This terraform DataSource is used to query the existing hostgroup from PowerMax array.
# The information fetched from this data source can be used for getting the details / for further processing in resource block.
# Returns all of the PowerMax host groups and their details
data "powermax_hostgroup" "all" {
# Optional Update the read timeout with (XXm) for minutes or (XXs) for timeout in seconds
# If unset defaults to 2 minute timeout
# timeouts = {
# read = "3m"
# }
}
output "all" {
value = data.powermax_hostgroup.all
}
# Returns a subset of the PowerMax host groups based on the names provided in the `names` filter block and their details
# data "powermax_hostgroup" "groups" {
# # Optional Update the read timeout with (XXm) for minutes or (XXs) for timeout in seconds
# # If unset defaults to 2 minute timeout
# # timeouts = {
# # read = "3m"
# # }
# filter {
# # Optional list of names to filter upon
# names = ["host_group_example_1", "host_group_example_2"]
# }
# }
# output "groups" {
# value = data.powermax_hostgroup.groups
# }
# After the successful execution of above said block, We can see the output value by executing 'terraform output' command.
# Also, we can use the fetched information by the variable data.powermax_hostgroup.example
Schema
Optional
filter
(Block, Optional) (see below for nested schema)timeouts
(Attributes) (see below for nested schema)
Read-Only
host_group_details
(Attributes List) List of Hostgroups (see below for nested schema)id
(String) Identifier
Nested Schema for filter
Optional:
names
(Set of String)
Nested Schema for timeouts
Optional:
read
(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).
Nested Schema for host_group_details
Optional:
host
(Attributes List) List of related host ids (see below for nested schema)maskingview
(List of String) List of masking views ids related to the host
Read-Only:
consistent_lun
(Boolean) Consistent lun flag sethost_group_id
(String) Id of a hostgroupname
(String) Name of a hostgroupnum_of_hosts
(Number) Number of hosts related to a hostgroupnum_of_initiators
(Number) Number of initiators related to a hostgroupnum_of_masking_views
(Number) Number of masking views related to a hostgroupport_flags_override
(Boolean) Port flags are overwrittentype
(String) The host group type
Nested Schema for host_group_details.host
Optional:
initiator
(List of String) The host initators associated with the host
Read-Only:
host_id
(String) The host id