powerscale_networkpool (Resource)

This resource is used to manage the network pool entity of PowerScale Array. We can Create, Update and Delete the network pool using this resource. We can also import an existing network pool from PowerScale array.

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.
*/

# Available actions: Create, Update, Delete and Import
# After `terraform apply` of this example file for the first time, you will create a network pool on the PowerScale

# PowerScale network pool allows you to add network interfaces to network pools to associate address ranges with a node or a group of nodes.
resource "powerscale_networkpool" "pool_test" {
  #   Required (subnet and groupnet cannot be modified once designated)
  #   Recommend using powerscale_groupnet.groupnet_example.name and powerscale_subnet.subnet_example.name to manage network pool together with groupnet and subnet
  name     = "pool_test"
  subnet   = "subnet0"
  groupnet = "groupnet0"

  #   Optional fields both for creating and updating
  #   access_zone = "System"
  #   aggregation_mode = "lacp"
  #   alloc_method = "static"
  #   description = "Test"
  #   ifaces = [
  #     {
  #       iface = "testIface",
  #       lnn = 0
  #     }
  #   ]
  #   nfsv3_rroce_only = false
  #   ranges = [
  #     {
  #       high = "testIPAddress1",
  #       low = "testIPAddress2"
  #     }
  #   ]
  #   rebalance_policy = "auto"
  #   sc_auto_unsuspend_delay = 0
  #   sc_connect_policy = "round_robin"
  #   sc_dns_zone = "testZoneName"
  #   sc_dns_zone_aliases = ["testZoneNameAlias"]
  #   sc_failover_policy = "round_robin"
  #   sc_subnet = "testSubnetName"
  #   sc_ttl = 0
  #   static_routes = [
  #     {
  #       gateway = "testGatewayAddress",
  #       prefixlen = 10,
  #       subnet = "testSubnetAddress"
  #     }
  #   ]
}

# After the execution of above resource block, network pool would have been created on the PowerScale array.
# For more information, Please check the terraform state file.

Schema

Required

  • groupnet (String) Name of the groupnet this pool belongs to. Cannot be modified once designated
  • name (String) The name of the pool. It must be unique throughout the given subnet.It’s a required field with POST method.
  • subnet (String) The name of the subnet. Cannot be modified once designated

Optional

  • access_zone (String) Name of a valid access zone to map IP address pool to the zone.
  • aggregation_mode (String) OneFS supports the following NIC aggregation modes.
  • alloc_method (String) Specifies how IP address allocation is done among pool members.
  • description (String) A description of the pool.
  • ifaces (Attributes List) List of interface members in this pool. (see below for nested schema)
  • nfsv3_rroce_only (Boolean) Indicates that pool contains only RDMA RRoCE capable interfaces.
  • ranges (Attributes List) List of IP address ranges in this pool. (see below for nested schema)
  • rebalance_policy (String) Rebalance policy..
  • sc_auto_unsuspend_delay (Number) Time delay in seconds before a node which has been automatically unsuspended becomes usable in SmartConnect responses for pool zones.
  • sc_connect_policy (String) SmartConnect client connection balancing policy.
  • sc_dns_zone (String) SmartConnect zone name for the pool.
  • sc_dns_zone_aliases (List of String) List of SmartConnect zone aliases (DNS names) to the pool.
  • sc_failover_policy (String) SmartConnect IP failover policy.
  • sc_subnet (String) Name of SmartConnect service subnet for this pool.
  • sc_ttl (Number) Time to live value for SmartConnect DNS query responses in seconds.
  • static_routes (Attributes List) List of interface members in this pool. (see below for nested schema)

Read-Only

  • addr_family (String) IP address format.
  • id (String) Unique Pool ID.
  • rules (List of String) Names of the rules in this pool.
  • sc_suspended_nodes (List of Number) List of LNNs showing currently suspended nodes in SmartConnect.

Nested Schema for ifaces

Optional:

  • iface (String) A string that defines an interface name.
  • lnn (Number) Logical Node Number (LNN) of a node.

Nested Schema for ranges

Optional:

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

Nested Schema for static_routes

Optional:

  • gateway (String) Address of the gateway in the format: yyy.yyy.yyy.yyy
  • prefixlen (Number) Prefix length in the format: nn.
  • subnet (String) Network address in the format: xxx.xxx.xxx.xxx

Import

Import is supported using the following syntax:

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

# The command is
# terraform import powerscale_networkpool.pool_test groupnet_name.subnet_name.pool_name
# Example:
terraform import powerscale_networkpool.pool_test groupnet0.subnet0.pool_test
# after running this command, populate the name field and other required parameters in the config file to start managing this resource.
# Note: running "terraform show" after importing shows the current config/state of the resource. You can copy/paste that config to make it easier to manage the resource.