powermax_maskingview (Data Source)

Data source for reading Masking Views in PowerMax array. PowerMax masking views are a container of a storage group, a port group, and an initiator group, and makes the storage group visible to the host. Devices are masked and mapped automatically. The groups must contain some device entries.

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 maskingview 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 masking views and their details
data "powermax_maskingview" "allMaskingViews" {
  # 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 "allMaskingViewsResult" {
  value = data.powermax_maskingview.allMaskingViews.masking_views
}

# Returns a subset of the PowerMax masking views based on the names provided in the `names` filter block and their details
data "powermax_maskingview" "maskingViewFilter" {
  # 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 = ["terraform_mv_1", "terraform_mv_2"]
  }
}

output "maskingViewFilterResult" {
  value = data.powermax_maskingview.maskingViewFilter.masking_views
}

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

Schema

Optional

Read-Only

  • id (String) Unique identifier of the masking view instance.
  • masking_views (Attributes List) List of masking views. (see below for nested schema)

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 masking_views

Read-Only:

  • capacity_gb (Number) The capacity of the storage group in the masking view.
  • host_group_id (String) The host group id of the masking view.
  • host_id (String) The host id of the masking view.
  • initiators (List of String) List of initiators.
  • masking_view_name (String) Unique identifier of the masking view.
  • port_group_id (String) The port group id of the masking view.
  • ports (List of String) List of ports.
  • storage_group_id (String) The storage group id of the masking view.
  • volumes (List of String) List of Volumes.