Skip to content

Latest commit

 

History

History
152 lines (116 loc) · 5.75 KB

File metadata and controls

152 lines (116 loc) · 5.75 KB
title linkTitle page_title subcategory description
powermax_portgroups data source
powermax_portgroups
powermax_portgroups Data Source - terraform-provider-powermax
Data source for reading PortGroups in PowerMax array. PowerMax port groups contain director and port identification and belong to a masking view. Ports can be added to and removed from the port group. Port groups that are no longer associated with a masking view can be deleted. Note the following recommendations: Port groups should contain four or more ports. Each port in a port group should be on a different director. A port can belong to more than one port group. However, for storage systems running HYPERMAX OS 5977 or higher, you cannot mix different types of ports (physical FC ports, virtual ports, and iSCSI virtual ports) within a single port group

powermax_portgroups (Data Source)

Data source for reading PortGroups in PowerMax array. PowerMax port groups contain director and port identification and belong to a masking view. Ports can be added to and removed from the port group. Port groups that are no longer associated with a masking view can be deleted. Note the following recommendations: Port groups should contain four or more ports. Each port in a port group should be on a different director. A port can belong to more than one port group. However, for storage systems running HYPERMAX OS 5977 or higher, you cannot mix different types of ports (physical FC ports, virtual ports, and iSCSI virtual ports) within a single port group

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 port group from PowerMax array.
# The information fetched from this data source can be used for getting the details / for further processing in resource block.

# List fibre portgroups.
data "powermax_portgroups" "fibreportgroups" {
  # 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"
  # }
  # Optional filter to list specified Portgroups names and/or type
  filter {
    # type for which portgroups to be listed  - fibre or iscsi
    type = "fibre"
    # Optional list of IDs to filter
    names = [
      "tfacc_test1_fibre",
      #"test2_fibre",
    ]
  }
}

data "powermax_portgroups" "scsiportgroups" {
  filter {
    type = "iscsi"
    # Optional filter to list specified Portgroups Names
  }
}

# List all portgroups.
data "powermax_portgroups" "allportgroups" {
  # 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 IDs to filter
  #names = [
  #  "test1",
  #  "test2",
  #]
  #}
}

# 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_portgroups.example

Schema

Optional

Read-Only

Nested Schema for filter

Optional:

  • names (Set of String)
  • type (String) The Type of the portgroup.

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 port_groups

Required:

  • name (String) The name of the portgroup.
  • ports (Attributes List) The list of ports associated with the portgroup. (see below for nested schema)
  • protocol (String) The portgroup protocol.
  • type (String) The Type of the portgroup.

Read-Only:

  • id (String) Identifier
  • maskingview (List of String) The masking views associated with the portgroup.
  • numofmaskingviews (Number) The number of masking views associated with the portgroup.
  • numofports (Number) The number of ports associated with the portgroup.

Nested Schema for port_groups.ports

Required:

  • director_id (String)
  • port_id (String)