powerscale.Subnet
Explore with Pulumi AI
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:
- Addr
Family 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.
- Dsr
Addrs List<string> - List of Direct Server Return addresses.
- Gateway string
- Gateway IP address.
- Gateway
Priority double - Gateway priority.
- Mtu double
- MTU of the subnet.
- Name string
- The name of the subnet.
- Sc
Service List<SubnetAddrs Sc Service Addr> - List of IP addresses that SmartConnect listens for DNS requests.
- Sc
Service stringName - Domain Name corresponding to the SmartConnect Service Address.
- Vlan
Enabled bool - VLAN tagging enabled or disabled.
- Vlan
Id double - VLAN ID for all interfaces in the subnet.
- Addr
Family 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.
- Dsr
Addrs []string - List of Direct Server Return addresses.
- Gateway string
- Gateway IP address.
- Gateway
Priority float64 - Gateway priority.
- Mtu float64
- MTU of the subnet.
- Name string
- The name of the subnet.
- Sc
Service []SubnetAddrs Sc Service Addr Args - List of IP addresses that SmartConnect listens for DNS requests.
- Sc
Service stringName - Domain Name corresponding to the SmartConnect Service Address.
- Vlan
Enabled bool - VLAN tagging enabled or disabled.
- Vlan
Id float64 - VLAN ID for all interfaces in the subnet.
- addr
Family 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.
- dsr
Addrs List<String> - List of Direct Server Return addresses.
- gateway String
- Gateway IP address.
- gateway
Priority Double - Gateway priority.
- mtu Double
- MTU of the subnet.
- name String
- The name of the subnet.
- sc
Service List<SubnetAddrs Sc Service Addr> - List of IP addresses that SmartConnect listens for DNS requests.
- sc
Service StringName - Domain Name corresponding to the SmartConnect Service Address.
- vlan
Enabled Boolean - VLAN tagging enabled or disabled.
- vlan
Id Double - VLAN ID for all interfaces in the subnet.
- addr
Family 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.
- dsr
Addrs string[] - List of Direct Server Return addresses.
- gateway string
- Gateway IP address.
- gateway
Priority number - Gateway priority.
- mtu number
- MTU of the subnet.
- name string
- The name of the subnet.
- sc
Service SubnetAddrs Sc Service Addr[] - List of IP addresses that SmartConnect listens for DNS requests.
- sc
Service stringName - 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.
- 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_ Sequence[Subnetaddrs Sc Service Addr Args] - List of IP addresses that SmartConnect listens for DNS requests.
- sc_
service_ strname - 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.
- addr
Family 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.
- dsr
Addrs List<String> - List of Direct Server Return addresses.
- gateway String
- Gateway IP address.
- gateway
Priority Number - Gateway priority.
- mtu Number
- MTU of the subnet.
- name String
- The name of the subnet.
- sc
Service List<Property Map>Addrs - List of IP addresses that SmartConnect listens for DNS requests.
- sc
Service StringName - 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the Subnet resource produces the following output properties:
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.
- Addr
Family string - IP address format.
- Base
Addr string - The base IP address.
- Description string
- A description of the subnet.
- Dsr
Addrs List<string> - List of Direct Server Return addresses.
- Gateway string
- Gateway IP address.
- Gateway
Priority 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.
- Sc
Service List<SubnetAddrs Sc Service Addr> - List of IP addresses that SmartConnect listens for DNS requests.
- Sc
Service stringName - Domain Name corresponding to the SmartConnect Service Address.
- Vlan
Enabled bool - VLAN tagging enabled or disabled.
- Vlan
Id double - VLAN ID for all interfaces in the subnet.
- Addr
Family string - IP address format.
- Base
Addr string - The base IP address.
- Description string
- A description of the subnet.
- Dsr
Addrs []string - List of Direct Server Return addresses.
- Gateway string
- Gateway IP address.
- Gateway
Priority 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.
- Sc
Service []SubnetAddrs Sc Service Addr Args - List of IP addresses that SmartConnect listens for DNS requests.
- Sc
Service stringName - Domain Name corresponding to the SmartConnect Service Address.
- Vlan
Enabled bool - VLAN tagging enabled or disabled.
- Vlan
Id float64 - VLAN ID for all interfaces in the subnet.
- addr
Family String - IP address format.
- base
Addr String - The base IP address.
- description String
- A description of the subnet.
- dsr
Addrs List<String> - List of Direct Server Return addresses.
- gateway String
- Gateway IP address.
- gateway
Priority 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.
- sc
Service List<SubnetAddrs Sc Service Addr> - List of IP addresses that SmartConnect listens for DNS requests.
- sc
Service StringName - Domain Name corresponding to the SmartConnect Service Address.
- vlan
Enabled Boolean - VLAN tagging enabled or disabled.
- vlan
Id Double - VLAN ID for all interfaces in the subnet.
- addr
Family string - IP address format.
- base
Addr string - The base IP address.
- description string
- A description of the subnet.
- dsr
Addrs 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. 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.
- sc
Service SubnetAddrs Sc Service Addr[] - List of IP addresses that SmartConnect listens for DNS requests.
- sc
Service stringName - 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.
- 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_ Sequence[Subnetaddrs Sc Service Addr Args] - List of IP addresses that SmartConnect listens for DNS requests.
- sc_
service_ strname - 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.
- addr
Family String - IP address format.
- base
Addr String - The base IP address.
- description String
- A description of the subnet.
- dsr
Addrs List<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. 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.
- sc
Service List<Property Map>Addrs - List of IP addresses that SmartConnect listens for DNS requests.
- sc
Service StringName - 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.
Supporting Types
SubnetScServiceAddr, SubnetScServiceAddrArgs
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.