1. Packages
  2. Powerscale Provider
  3. API Docs
  4. Subnet
powerscale 1.7.1 published on Wednesday, Apr 30, 2025 by dell

powerscale.Subnet

Explore with Pulumi AI

powerscale logo
powerscale 1.7.1 published on Wednesday, Apr 30, 2025 by dell

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as powerscale from "@pulumi/powerscale";
    
    // PowerScale subnet allows you to manage the subnet on the Powerscale array
    const subnet = new powerscale.Subnet("subnet", {
        addrFamily: "ipv4",
        groupnet: "groupnet0",
        prefixlen: 21,
    });
    
    import pulumi
    import pulumi_powerscale as powerscale
    
    # PowerScale subnet allows you to manage the subnet on the Powerscale array
    subnet = powerscale.Subnet("subnet",
        addr_family="ipv4",
        groupnet="groupnet0",
        prefixlen=21)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/powerscale/powerscale"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// PowerScale subnet allows you to manage the subnet on the Powerscale array
    		_, err := powerscale.NewSubnet(ctx, "subnet", &powerscale.SubnetArgs{
    			AddrFamily: pulumi.String("ipv4"),
    			Groupnet:   pulumi.String("groupnet0"),
    			Prefixlen:  pulumi.Float64(21),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Powerscale = Pulumi.Powerscale;
    
    return await Deployment.RunAsync(() => 
    {
        // PowerScale subnet allows you to manage the subnet on the Powerscale array
        var subnet = new Powerscale.Subnet("subnet", new()
        {
            AddrFamily = "ipv4",
            Groupnet = "groupnet0",
            Prefixlen = 21,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.powerscale.Subnet;
    import com.pulumi.powerscale.SubnetArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // PowerScale subnet allows you to manage the subnet on the Powerscale array
            var subnet = new Subnet("subnet", SubnetArgs.builder()
                .addrFamily("ipv4")
                .groupnet("groupnet0")
                .prefixlen(21)
                .build());
    
        }
    }
    
    resources:
      # PowerScale subnet allows you to manage the subnet on the Powerscale array
      subnet:
        type: powerscale:Subnet
        properties:
          # Required. IP address format
          addrFamily: ipv4
          # Required. Name of the groupnet this subnet belongs to
          #     // Updating is not allowed
          #     // when managing resource together with groupnet, recommend:
          #     // groupnet = powerscale_groupnet.example_groupnet.name
          groupnet: groupnet0
          # Required. Subnet Prefix Length
          prefixlen: 21
    

    Create Subnet Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Subnet(name: string, args: SubnetArgs, opts?: CustomResourceOptions);
    @overload
    def Subnet(resource_name: str,
               args: SubnetArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Subnet(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               groupnet: Optional[str] = None,
               prefixlen: Optional[float] = None,
               addr_family: Optional[str] = None,
               mtu: Optional[float] = None,
               gateway_priority: Optional[float] = None,
               gateway: Optional[str] = None,
               dsr_addrs: Optional[Sequence[str]] = None,
               name: Optional[str] = None,
               description: Optional[str] = None,
               sc_service_addrs: Optional[Sequence[SubnetScServiceAddrArgs]] = None,
               sc_service_name: Optional[str] = None,
               vlan_enabled: Optional[bool] = None,
               vlan_id: Optional[float] = None)
    func NewSubnet(ctx *Context, name string, args SubnetArgs, opts ...ResourceOption) (*Subnet, error)
    public Subnet(string name, SubnetArgs args, CustomResourceOptions? opts = null)
    public Subnet(String name, SubnetArgs args)
    public Subnet(String name, SubnetArgs args, CustomResourceOptions options)
    
    type: powerscale:Subnet
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SubnetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SubnetArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SubnetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SubnetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SubnetArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var subnetResource = new Powerscale.Subnet("subnetResource", new()
    {
        Groupnet = "string",
        Prefixlen = 0,
        AddrFamily = "string",
        Mtu = 0,
        GatewayPriority = 0,
        Gateway = "string",
        DsrAddrs = new[]
        {
            "string",
        },
        Name = "string",
        Description = "string",
        ScServiceAddrs = new[]
        {
            new Powerscale.Inputs.SubnetScServiceAddrArgs
            {
                High = "string",
                Low = "string",
            },
        },
        ScServiceName = "string",
        VlanEnabled = false,
        VlanId = 0,
    });
    
    example, err := powerscale.NewSubnet(ctx, "subnetResource", &powerscale.SubnetArgs{
    	Groupnet:        pulumi.String("string"),
    	Prefixlen:       pulumi.Float64(0),
    	AddrFamily:      pulumi.String("string"),
    	Mtu:             pulumi.Float64(0),
    	GatewayPriority: pulumi.Float64(0),
    	Gateway:         pulumi.String("string"),
    	DsrAddrs: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name:        pulumi.String("string"),
    	Description: pulumi.String("string"),
    	ScServiceAddrs: powerscale.SubnetScServiceAddrArray{
    		&powerscale.SubnetScServiceAddrArgs{
    			High: pulumi.String("string"),
    			Low:  pulumi.String("string"),
    		},
    	},
    	ScServiceName: pulumi.String("string"),
    	VlanEnabled:   pulumi.Bool(false),
    	VlanId:        pulumi.Float64(0),
    })
    
    var subnetResource = new Subnet("subnetResource", SubnetArgs.builder()
        .groupnet("string")
        .prefixlen(0)
        .addrFamily("string")
        .mtu(0)
        .gatewayPriority(0)
        .gateway("string")
        .dsrAddrs("string")
        .name("string")
        .description("string")
        .scServiceAddrs(SubnetScServiceAddrArgs.builder()
            .high("string")
            .low("string")
            .build())
        .scServiceName("string")
        .vlanEnabled(false)
        .vlanId(0)
        .build());
    
    subnet_resource = powerscale.Subnet("subnetResource",
        groupnet="string",
        prefixlen=0,
        addr_family="string",
        mtu=0,
        gateway_priority=0,
        gateway="string",
        dsr_addrs=["string"],
        name="string",
        description="string",
        sc_service_addrs=[{
            "high": "string",
            "low": "string",
        }],
        sc_service_name="string",
        vlan_enabled=False,
        vlan_id=0)
    
    const subnetResource = new powerscale.Subnet("subnetResource", {
        groupnet: "string",
        prefixlen: 0,
        addrFamily: "string",
        mtu: 0,
        gatewayPriority: 0,
        gateway: "string",
        dsrAddrs: ["string"],
        name: "string",
        description: "string",
        scServiceAddrs: [{
            high: "string",
            low: "string",
        }],
        scServiceName: "string",
        vlanEnabled: false,
        vlanId: 0,
    });
    
    type: powerscale:Subnet
    properties:
        addrFamily: string
        description: string
        dsrAddrs:
            - string
        gateway: string
        gatewayPriority: 0
        groupnet: string
        mtu: 0
        name: string
        prefixlen: 0
        scServiceAddrs:
            - high: string
              low: string
        scServiceName: string
        vlanEnabled: false
        vlanId: 0
    

    Subnet Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Subnet resource accepts the following input properties:

    AddrFamily string
    IP address format.
    Groupnet string
    Name of the groupnet this subnet belongs to. Updating is not allowed.
    Prefixlen double
    Subnet Prefix Length.
    Description string
    A description of the subnet.
    DsrAddrs List<string>
    List of Direct Server Return addresses.
    Gateway string
    Gateway IP address.
    GatewayPriority double
    Gateway priority.
    Mtu double
    MTU of the subnet.
    Name string
    The name of the subnet.
    ScServiceAddrs List<SubnetScServiceAddr>
    List of IP addresses that SmartConnect listens for DNS requests.
    ScServiceName string
    Domain Name corresponding to the SmartConnect Service Address.
    VlanEnabled bool
    VLAN tagging enabled or disabled.
    VlanId double
    VLAN ID for all interfaces in the subnet.
    AddrFamily string
    IP address format.
    Groupnet string
    Name of the groupnet this subnet belongs to. Updating is not allowed.
    Prefixlen float64
    Subnet Prefix Length.
    Description string
    A description of the subnet.
    DsrAddrs []string
    List of Direct Server Return addresses.
    Gateway string
    Gateway IP address.
    GatewayPriority float64
    Gateway priority.
    Mtu float64
    MTU of the subnet.
    Name string
    The name of the subnet.
    ScServiceAddrs []SubnetScServiceAddrArgs
    List of IP addresses that SmartConnect listens for DNS requests.
    ScServiceName string
    Domain Name corresponding to the SmartConnect Service Address.
    VlanEnabled bool
    VLAN tagging enabled or disabled.
    VlanId float64
    VLAN ID for all interfaces in the subnet.
    addrFamily String
    IP address format.
    groupnet String
    Name of the groupnet this subnet belongs to. Updating is not allowed.
    prefixlen Double
    Subnet Prefix Length.
    description String
    A description of the subnet.
    dsrAddrs List<String>
    List of Direct Server Return addresses.
    gateway String
    Gateway IP address.
    gatewayPriority Double
    Gateway priority.
    mtu Double
    MTU of the subnet.
    name String
    The name of the subnet.
    scServiceAddrs List<SubnetScServiceAddr>
    List of IP addresses that SmartConnect listens for DNS requests.
    scServiceName String
    Domain Name corresponding to the SmartConnect Service Address.
    vlanEnabled Boolean
    VLAN tagging enabled or disabled.
    vlanId Double
    VLAN ID for all interfaces in the subnet.
    addrFamily string
    IP address format.
    groupnet string
    Name of the groupnet this subnet belongs to. Updating is not allowed.
    prefixlen number
    Subnet Prefix Length.
    description string
    A description of the subnet.
    dsrAddrs string[]
    List of Direct Server Return addresses.
    gateway string
    Gateway IP address.
    gatewayPriority number
    Gateway priority.
    mtu number
    MTU of the subnet.
    name string
    The name of the subnet.
    scServiceAddrs SubnetScServiceAddr[]
    List of IP addresses that SmartConnect listens for DNS requests.
    scServiceName string
    Domain Name corresponding to the SmartConnect Service Address.
    vlanEnabled boolean
    VLAN tagging enabled or disabled.
    vlanId number
    VLAN ID for all interfaces in the subnet.
    addr_family str
    IP address format.
    groupnet str
    Name of the groupnet this subnet belongs to. Updating is not allowed.
    prefixlen float
    Subnet Prefix Length.
    description str
    A description of the subnet.
    dsr_addrs Sequence[str]
    List of Direct Server Return addresses.
    gateway str
    Gateway IP address.
    gateway_priority float
    Gateway priority.
    mtu float
    MTU of the subnet.
    name str
    The name of the subnet.
    sc_service_addrs Sequence[SubnetScServiceAddrArgs]
    List of IP addresses that SmartConnect listens for DNS requests.
    sc_service_name str
    Domain Name corresponding to the SmartConnect Service Address.
    vlan_enabled bool
    VLAN tagging enabled or disabled.
    vlan_id float
    VLAN ID for all interfaces in the subnet.
    addrFamily String
    IP address format.
    groupnet String
    Name of the groupnet this subnet belongs to. Updating is not allowed.
    prefixlen Number
    Subnet Prefix Length.
    description String
    A description of the subnet.
    dsrAddrs List<String>
    List of Direct Server Return addresses.
    gateway String
    Gateway IP address.
    gatewayPriority Number
    Gateway priority.
    mtu Number
    MTU of the subnet.
    name String
    The name of the subnet.
    scServiceAddrs List<Property Map>
    List of IP addresses that SmartConnect listens for DNS requests.
    scServiceName String
    Domain Name corresponding to the SmartConnect Service Address.
    vlanEnabled Boolean
    VLAN tagging enabled or disabled.
    vlanId Number
    VLAN ID for all interfaces in the subnet.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Subnet resource produces the following output properties:

    BaseAddr string
    The base IP address.
    Id string
    The provider-assigned unique ID for this managed resource.
    Pools List<string>
    Name of the pools in the subnet.
    BaseAddr string
    The base IP address.
    Id string
    The provider-assigned unique ID for this managed resource.
    Pools []string
    Name of the pools in the subnet.
    baseAddr String
    The base IP address.
    id String
    The provider-assigned unique ID for this managed resource.
    pools List<String>
    Name of the pools in the subnet.
    baseAddr string
    The base IP address.
    id string
    The provider-assigned unique ID for this managed resource.
    pools string[]
    Name of the pools in the subnet.
    base_addr str
    The base IP address.
    id str
    The provider-assigned unique ID for this managed resource.
    pools Sequence[str]
    Name of the pools in the subnet.
    baseAddr String
    The base IP address.
    id String
    The provider-assigned unique ID for this managed resource.
    pools List<String>
    Name of the pools in the subnet.

    Look up Existing Subnet Resource

    Get an existing Subnet resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SubnetState, opts?: CustomResourceOptions): Subnet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            addr_family: Optional[str] = None,
            base_addr: Optional[str] = None,
            description: Optional[str] = None,
            dsr_addrs: Optional[Sequence[str]] = None,
            gateway: Optional[str] = None,
            gateway_priority: Optional[float] = None,
            groupnet: Optional[str] = None,
            mtu: Optional[float] = None,
            name: Optional[str] = None,
            pools: Optional[Sequence[str]] = None,
            prefixlen: Optional[float] = None,
            sc_service_addrs: Optional[Sequence[SubnetScServiceAddrArgs]] = None,
            sc_service_name: Optional[str] = None,
            vlan_enabled: Optional[bool] = None,
            vlan_id: Optional[float] = None) -> Subnet
    func GetSubnet(ctx *Context, name string, id IDInput, state *SubnetState, opts ...ResourceOption) (*Subnet, error)
    public static Subnet Get(string name, Input<string> id, SubnetState? state, CustomResourceOptions? opts = null)
    public static Subnet get(String name, Output<String> id, SubnetState state, CustomResourceOptions options)
    resources:  _:    type: powerscale:Subnet    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AddrFamily string
    IP address format.
    BaseAddr string
    The base IP address.
    Description string
    A description of the subnet.
    DsrAddrs List<string>
    List of Direct Server Return addresses.
    Gateway string
    Gateway IP address.
    GatewayPriority double
    Gateway priority.
    Groupnet string
    Name of the groupnet this subnet belongs to. Updating is not allowed.
    Mtu double
    MTU of the subnet.
    Name string
    The name of the subnet.
    Pools List<string>
    Name of the pools in the subnet.
    Prefixlen double
    Subnet Prefix Length.
    ScServiceAddrs List<SubnetScServiceAddr>
    List of IP addresses that SmartConnect listens for DNS requests.
    ScServiceName string
    Domain Name corresponding to the SmartConnect Service Address.
    VlanEnabled bool
    VLAN tagging enabled or disabled.
    VlanId double
    VLAN ID for all interfaces in the subnet.
    AddrFamily string
    IP address format.
    BaseAddr string
    The base IP address.
    Description string
    A description of the subnet.
    DsrAddrs []string
    List of Direct Server Return addresses.
    Gateway string
    Gateway IP address.
    GatewayPriority float64
    Gateway priority.
    Groupnet string
    Name of the groupnet this subnet belongs to. Updating is not allowed.
    Mtu float64
    MTU of the subnet.
    Name string
    The name of the subnet.
    Pools []string
    Name of the pools in the subnet.
    Prefixlen float64
    Subnet Prefix Length.
    ScServiceAddrs []SubnetScServiceAddrArgs
    List of IP addresses that SmartConnect listens for DNS requests.
    ScServiceName string
    Domain Name corresponding to the SmartConnect Service Address.
    VlanEnabled bool
    VLAN tagging enabled or disabled.
    VlanId float64
    VLAN ID for all interfaces in the subnet.
    addrFamily String
    IP address format.
    baseAddr String
    The base IP address.
    description String
    A description of the subnet.
    dsrAddrs List<String>
    List of Direct Server Return addresses.
    gateway String
    Gateway IP address.
    gatewayPriority Double
    Gateway priority.
    groupnet String
    Name of the groupnet this subnet belongs to. Updating is not allowed.
    mtu Double
    MTU of the subnet.
    name String
    The name of the subnet.
    pools List<String>
    Name of the pools in the subnet.
    prefixlen Double
    Subnet Prefix Length.
    scServiceAddrs List<SubnetScServiceAddr>
    List of IP addresses that SmartConnect listens for DNS requests.
    scServiceName String
    Domain Name corresponding to the SmartConnect Service Address.
    vlanEnabled Boolean
    VLAN tagging enabled or disabled.
    vlanId Double
    VLAN ID for all interfaces in the subnet.
    addrFamily string
    IP address format.
    baseAddr string
    The base IP address.
    description string
    A description of the subnet.
    dsrAddrs string[]
    List of Direct Server Return addresses.
    gateway string
    Gateway IP address.
    gatewayPriority number
    Gateway priority.
    groupnet string
    Name of the groupnet this subnet belongs to. Updating is not allowed.
    mtu number
    MTU of the subnet.
    name string
    The name of the subnet.
    pools string[]
    Name of the pools in the subnet.
    prefixlen number
    Subnet Prefix Length.
    scServiceAddrs SubnetScServiceAddr[]
    List of IP addresses that SmartConnect listens for DNS requests.
    scServiceName string
    Domain Name corresponding to the SmartConnect Service Address.
    vlanEnabled boolean
    VLAN tagging enabled or disabled.
    vlanId number
    VLAN ID for all interfaces in the subnet.
    addr_family str
    IP address format.
    base_addr str
    The base IP address.
    description str
    A description of the subnet.
    dsr_addrs Sequence[str]
    List of Direct Server Return addresses.
    gateway str
    Gateway IP address.
    gateway_priority float
    Gateway priority.
    groupnet str
    Name of the groupnet this subnet belongs to. Updating is not allowed.
    mtu float
    MTU of the subnet.
    name str
    The name of the subnet.
    pools Sequence[str]
    Name of the pools in the subnet.
    prefixlen float
    Subnet Prefix Length.
    sc_service_addrs Sequence[SubnetScServiceAddrArgs]
    List of IP addresses that SmartConnect listens for DNS requests.
    sc_service_name str
    Domain Name corresponding to the SmartConnect Service Address.
    vlan_enabled bool
    VLAN tagging enabled or disabled.
    vlan_id float
    VLAN ID for all interfaces in the subnet.
    addrFamily String
    IP address format.
    baseAddr String
    The base IP address.
    description String
    A description of the subnet.
    dsrAddrs List<String>
    List of Direct Server Return addresses.
    gateway String
    Gateway IP address.
    gatewayPriority Number
    Gateway priority.
    groupnet String
    Name of the groupnet this subnet belongs to. Updating is not allowed.
    mtu Number
    MTU of the subnet.
    name String
    The name of the subnet.
    pools List<String>
    Name of the pools in the subnet.
    prefixlen Number
    Subnet Prefix Length.
    scServiceAddrs List<Property Map>
    List of IP addresses that SmartConnect listens for DNS requests.
    scServiceName String
    Domain Name corresponding to the SmartConnect Service Address.
    vlanEnabled Boolean
    VLAN tagging enabled or disabled.
    vlanId Number
    VLAN ID for all interfaces in the subnet.

    Supporting Types

    SubnetScServiceAddr, SubnetScServiceAddrArgs

    High string
    High IP
    Low string
    Low IP
    High string
    High IP
    Low string
    Low IP
    high String
    High IP
    low String
    Low IP
    high string
    High IP
    low string
    Low IP
    high str
    High IP
    low str
    Low IP
    high String
    High IP
    low String
    Low IP

    Import

    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

    $ pulumi import powerscale:index/subnet:Subnet subnet <groupnet_id>.<subnet_id>
    

    Example:

    $ pulumi import powerscale:index/subnet:Subnet subnet groupnet0.subnet0
    

    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.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    powerscale dell/terraform-provider-powerscale
    License
    Notes
    This Pulumi package is based on the powerscale Terraform Provider.
    powerscale logo
    powerscale 1.7.1 published on Wednesday, Apr 30, 2025 by dell