title | linkTitle | page_title | subcategory | description |
---|---|---|---|---|
powerstore_hostgroup data source |
powerstore_hostgroup |
powerstore_hostgroup Data Source - powerstore |
This datasource is used to query the existing host group from PowerStore 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 host group from PowerStore array. The information fetched from this datasource can be used for getting the details for further processing in resource block.
Note: Only one of
name
orid
can be provided at a time.
/*
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
# This datasource reads host groups either by id or name where user can provide a value to any one of them
# If it is a empty datsource block , then it will read all the host groups
# If id or name is provided then it reads a particular host group with that id or name
# Only one of the attribute can be provided among id and name
data "powerstore_hostgroup" "test1" {
name = "test_hostgroup1"
}
output "hostGroupResult" {
value = data.powerstore_hostgroup.test1.host_groups
}
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.powerstore_hostgroup.test1.attribute_name
where attribute_name is the attribute which user wants to fetch.
id
(String) Unique identifier of the host group. Conflicts withname
.name
(String) Host group name. Conflicts withid
.
host_groups
(Attributes List) List of host groups. (see below for nested schema)
Read-Only:
description
(String) Host group description.host_connectivity
(String) Connectivity type for hosts and host groups.host_connectivity_l10n
(String) Localized message string corresponding to host_connectivityhost_virtual_volume_mappings
(Attributes List) Virtual volume mapping details. (see below for nested schema)hosts
(Attributes List) Properties of a host. (see below for nested schema)id
(String) Unique identifier of the host group.mapped_host_groups
(Attributes List) Details about a configured host or host group attached to a volume. (see below for nested schema)name
(String) Host group name.
Read-Only:
host_id
(String) Unique identifier of a host attached to a volume.id
(String) Unique identifier of a mapping between a host and a virtual volume.virtual_volume_id
(String) Unique identifier of the virtual volume to which the host is attached.virtual_volume_name
(String) Name of the virtual volume to which the host is attached.
Read-Only:
description
(String) A description for the host.id
(String) Unique identifier of the host.name
(String) The host name.
Read-Only:
host_id
(String) Unique identifier of a host attached to a volume.id
(String) Unique identifier of a mapping between a host and a volume.volume_id
(String) Unique identifier of the volume to which the host is attached.volume_name
(String) Name of the volume to which the host is attached.