Skip to content

Latest commit

 

History

History
146 lines (106 loc) · 5.76 KB

File metadata and controls

146 lines (106 loc) · 5.76 KB
title linkTitle page_title subcategory description
powerstore_host data source
powerstore_host
powerstore_host Data Source - powerstore
This datasource is used to query the existing host from PowerStore array. The information fetched from this datasource can be used for getting the details for further processing in resource block.

powerstore_host (Data Source)

This datasource is used to query the existing host 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 or id can be provided at a time.

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
# This datasource reads hosts 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 hosts
# If id or name is provided then it reads a particular host with that id or name
# Only one of the attribute can be provided among id and name

data "powerstore_host" "test1" {
  name = "tf_host"
}

output "hostResult" {
  value = data.powerstore_host.test1.hosts
}

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_host.test1.attribute_name where attribute_name is the attribute which user wants to fetch.

Schema

Optional

  • id (String) Unique identifier of the host instance. Conflicts with name.
  • name (String) Name of the host. Conflicts with id.

Read-Only

Nested Schema for host

Read-Only:

  • description (String) Description of the host.
  • host_connectivity (String) Connectivity type for hosts.
  • host_connectivity_l10n (String) Localized message string corresponding to host connectivity.
  • host_group_id (String) Associated host group, if host is part of host group.
  • host_virtual_volume_mappings (Attributes List) Virtual volume mapping details. (see below for nested schema)
  • id (String) The ID of the host.
  • import_host_system (Object) Details about an import host system. (see below for nested schema)
  • initiators (Attributes List) Initiator instance. (see below for nested schema)
  • mapped_hosts (Attributes List) Details about a configured host or host group attached to a volume. (see below for nested schema)
  • name (String) Name of the host.
  • os_type (String) Operating system of the host.
  • os_type_l10n (String) Localized message string corresponding to OS type.
  • type (String) Type of hosts.
  • type_l10n (String) Localized message string corresponding to type
  • vsphere_hosts (Attributes List) List of the vsphere hosts that are associated with this host. (see below for nested schema)

Nested Schema for host.host_virtual_volume_mappings

Read-Only:

  • host_id (String) Unique identifier of a host attached to a virtual 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.

Nested Schema for host.import_host_system

Read-Only:

  • agent_address (String)
  • id (String)

Nested Schema for host.initiators

Read-Only:

  • chap_mutual_username (String) Username for CHAP authentication.
  • chap_single_username (String) Username for CHAP authentication.
  • port_name (String) The port name, one of: IQN, WWN, or NQN..
  • port_type (String) Protocol type of the host initiator.

Nested Schema for host.mapped_hosts

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.

Nested Schema for host.vsphere_hosts

Read-Only:

  • id (String) Unique identifier of the vsphere_host instance.
  • name (String) User-assigned name of the ESXi host in vCenter.