Skip to content

Latest commit

 

History

History
123 lines (94 loc) · 4.16 KB

File metadata and controls

123 lines (94 loc) · 4.16 KB
title linkTitle page_title subcategory description
powerscale_subnet data source
powerscale_subnet
powerscale_subnet Data Source - terraform-provider-powerscale
This datasource is used to query the existing Subnets from PowerScale array. The information fetched from this datasource can be used for getting the details or for further processing in resource block.

powerscale_subnet (Data Source)

This datasource is used to query the existing Subnets from PowerScale array. The information fetched from this datasource can be used for getting the details or for further processing in resource block.

Example Usage

/*
Copyright (c) 2023-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.
*/

# Returns all of the PowerScale subnets and their details
data "powerscale_subnet" "all" {
}

output "powerscale_subnet" {
  value = data.powerscale_subnet.all
}

# Returns a subset of the PowerScale subnets based on `names` and `groupnet_name`
data "powerscale_subnet" "test" {
  # Optional list  filter upon
  filter {
    names         = ["subnet0"]
    groupnet_name = "groupnet0"
  }
}

output "powerscale_subnet" {
  value = data.powerscale_subnet.test
}

# 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.powerscale_subnet.all

Schema

Optional

Read-Only

Nested Schema for filter

Optional:

  • groupnet_name (String) Specifies which groupnet to query.
  • names (Set of String) List of subnet name.

Nested Schema for subnets

Read-Only:

  • addr_family (String) IP address format.
  • base_addr (String) The base IP address.
  • description (String) A description of the subnet.
  • dsr_addrs (List of String) List of Direct Server Return addresses.
  • gateway (String) Gateway IP address.
  • gateway_priority (Number) Gateway priority.
  • groupnet (String) Name of the groupnet this subnet belongs to.
  • id (String) Unique Subnet ID.
  • mtu (Number) MTU of the subnet.
  • name (String) The name of the subnet.
  • pools (List of String) Name of the pools in the subnet.
  • prefixlen (Number) Subnet Prefix Length.
  • sc_service_addrs (Attributes List) List of IP addresses that SmartConnect listens for DNS requests. (see below for nested schema)
  • sc_service_name (String) Domain Name corresponding to the SmartConnect Service Address.
  • vlan_enabled (Boolean) VLAN tagging enabled or disabled.
  • vlan_id (Number) VLAN ID for all interfaces in the subnet.

Nested Schema for subnets.sc_service_addrs

Read-Only:

  • high (String) High IP
  • low (String) Low IP