Subnet

Manages a V2 Neutron subnet resource within OpenStack.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var network1 = new OpenStack.Networking.Network("network1", new OpenStack.Networking.NetworkArgs
        {
            AdminStateUp = true,
        });
        var subnet1 = new OpenStack.Networking.Subnet("subnet1", new OpenStack.Networking.SubnetArgs
        {
            Cidr = "192.168.199.0/24",
            NetworkId = network1.Id,
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

network1 = openstack.networking.Network("network1", admin_state_up="true")
subnet1 = openstack.networking.Subnet("subnet1",
    cidr="192.168.199.0/24",
    network_id=network1.id)
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const network1 = new openstack.networking.Network("network_1", {
    adminStateUp: true,
});
const subnet1 = new openstack.networking.Subnet("subnet_1", {
    cidr: "192.168.199.0/24",
    networkId: network1.id,
});

Create a Subnet Resource

new Subnet(name: string, args: SubnetArgs, opts?: CustomResourceOptions);
def Subnet(resource_name, opts=None, allocation_pools=None, allocation_pools_collection=None, cidr=None, description=None, dns_nameservers=None, enable_dhcp=None, gateway_ip=None, host_routes=None, ip_version=None, ipv6_address_mode=None, ipv6_ra_mode=None, name=None, network_id=None, no_gateway=None, prefix_length=None, region=None, subnetpool_id=None, tags=None, tenant_id=None, value_specs=None, __props__=None);
func NewSubnet(ctx *Context, name string, args SubnetArgs, opts ...ResourceOption) (*Subnet, error)
public Subnet(string name, SubnetArgs args, CustomResourceOptions? opts = null)
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.
opts ResourceOptions
A bag of options that control this 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.

Subnet Resource Properties

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

Inputs

The Subnet resource accepts the following input properties:

NetworkId string

The UUID of the parent network. Changing this creates a new subnet.

AllocationPools List<Pulumi.OpenStack.Networking.Inputs.SubnetAllocationPoolArgs>

A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.

AllocationPoolsCollection List<Pulumi.OpenStack.Networking.Inputs.SubnetAllocationPoolsCollectionArgs>

A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. The allocation_pools block is documented below.

Deprecated: use allocation_pool instead

Cidr string

CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.

Description string

Human-readable description of the subnet. Changing this updates the name of the existing subnet.

DnsNameservers List<string>

An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.

EnableDhcp bool

The administrative state of the network. Acceptable values are “true” and “false”. Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.

GatewayIp string

Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default gateway of .1 to be used. Changing this updates the gateway IP of the existing subnet.

HostRoutes List<Pulumi.OpenStack.Networking.Inputs.SubnetHostRouteArgs>

(Deprecated - use openstack.networking.SubnetRoute instead) An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.

Deprecated: Use openstack_networking_subnet_route_v2 instead

IpVersion int

IP version, either 4 (default) or 6. Changing this creates a new subnet.

Ipv6AddressMode string

The IPv6 address mode. Valid values are dhcpv6-stateful, dhcpv6-stateless, or slaac.

Ipv6RaMode string

The IPv6 Router Advertisement mode. Valid values are dhcpv6-stateful, dhcpv6-stateless, or slaac.

Name string

The name of the subnet. Changing this updates the name of the existing subnet.

NoGateway bool

Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.

PrefixLength int

The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.

Region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.

SubnetpoolId string

The ID of the subnetpool associated with the subnet.

Tags List<string>

A set of string tags for the subnet.

TenantId string

The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.

ValueSpecs Dictionary<string, object>

Map of additional options.

NetworkId string

The UUID of the parent network. Changing this creates a new subnet.

AllocationPools []SubnetAllocationPool

A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.

AllocationPoolsCollection []SubnetAllocationPoolsCollection

A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. The allocation_pools block is documented below.

Deprecated: use allocation_pool instead

Cidr string

CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.

Description string

Human-readable description of the subnet. Changing this updates the name of the existing subnet.

DnsNameservers []string

An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.

EnableDhcp bool

The administrative state of the network. Acceptable values are “true” and “false”. Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.

GatewayIp string

Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default gateway of .1 to be used. Changing this updates the gateway IP of the existing subnet.

HostRoutes []SubnetHostRoute

(Deprecated - use openstack.networking.SubnetRoute instead) An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.

Deprecated: Use openstack_networking_subnet_route_v2 instead

IpVersion int

IP version, either 4 (default) or 6. Changing this creates a new subnet.

Ipv6AddressMode string

The IPv6 address mode. Valid values are dhcpv6-stateful, dhcpv6-stateless, or slaac.

Ipv6RaMode string

The IPv6 Router Advertisement mode. Valid values are dhcpv6-stateful, dhcpv6-stateless, or slaac.

Name string

The name of the subnet. Changing this updates the name of the existing subnet.

NoGateway bool

Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.

PrefixLength int

The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.

Region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.

SubnetpoolId string

The ID of the subnetpool associated with the subnet.

Tags []string

A set of string tags for the subnet.

TenantId string

The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.

ValueSpecs map[string]interface{}

Map of additional options.

networkId string

The UUID of the parent network. Changing this creates a new subnet.

allocationPools SubnetAllocationPool[]

A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.

allocationPoolsCollection SubnetAllocationPoolsCollection[]

A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. The allocation_pools block is documented below.

Deprecated: use allocation_pool instead

cidr string

CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.

description string

Human-readable description of the subnet. Changing this updates the name of the existing subnet.

dnsNameservers string[]

An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.

enableDhcp boolean

The administrative state of the network. Acceptable values are “true” and “false”. Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.

gatewayIp string

Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default gateway of .1 to be used. Changing this updates the gateway IP of the existing subnet.

hostRoutes SubnetHostRoute[]

(Deprecated - use openstack.networking.SubnetRoute instead) An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.

Deprecated: Use openstack_networking_subnet_route_v2 instead

ipVersion number

IP version, either 4 (default) or 6. Changing this creates a new subnet.

ipv6AddressMode string

The IPv6 address mode. Valid values are dhcpv6-stateful, dhcpv6-stateless, or slaac.

ipv6RaMode string

The IPv6 Router Advertisement mode. Valid values are dhcpv6-stateful, dhcpv6-stateless, or slaac.

name string

The name of the subnet. Changing this updates the name of the existing subnet.

noGateway boolean

Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.

prefixLength number

The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.

region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.

subnetpoolId string

The ID of the subnetpool associated with the subnet.

tags string[]

A set of string tags for the subnet.

tenantId string

The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.

valueSpecs {[key: string]: any}

Map of additional options.

network_id str

The UUID of the parent network. Changing this creates a new subnet.

allocation_pools List[SubnetAllocationPool]

A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.

allocation_pools_collection List[SubnetAllocationPoolsCollection]

A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. The allocation_pools block is documented below.

Deprecated: use allocation_pool instead

cidr str

CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.

description str

Human-readable description of the subnet. Changing this updates the name of the existing subnet.

dns_nameservers List[str]

An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.

enable_dhcp bool

The administrative state of the network. Acceptable values are “true” and “false”. Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.

gateway_ip str

Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default gateway of .1 to be used. Changing this updates the gateway IP of the existing subnet.

host_routes List[SubnetHostRoute]

(Deprecated - use openstack.networking.SubnetRoute instead) An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.

Deprecated: Use openstack_networking_subnet_route_v2 instead

ip_version float

IP version, either 4 (default) or 6. Changing this creates a new subnet.

ipv6_address_mode str

The IPv6 address mode. Valid values are dhcpv6-stateful, dhcpv6-stateless, or slaac.

ipv6_ra_mode str

The IPv6 Router Advertisement mode. Valid values are dhcpv6-stateful, dhcpv6-stateless, or slaac.

name str

The name of the subnet. Changing this updates the name of the existing subnet.

no_gateway bool

Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.

prefix_length float

The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.

region str

The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.

subnetpool_id str

The ID of the subnetpool associated with the subnet.

tags List[str]

A set of string tags for the subnet.

tenant_id str

The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.

value_specs Dict[str, Any]

Map of additional options.

Outputs

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

AllTags List<string>

The collection of ags assigned on the subnet, which have been explicitly and implicitly added.

Id string
The provider-assigned unique ID for this managed resource.
AllTags []string

The collection of ags assigned on the subnet, which have been explicitly and implicitly added.

Id string
The provider-assigned unique ID for this managed resource.
allTags string[]

The collection of ags assigned on the subnet, which have been explicitly and implicitly added.

id string
The provider-assigned unique ID for this managed resource.
all_tags List[str]

The collection of ags assigned on the subnet, which have been explicitly and implicitly added.

id str
The provider-assigned unique ID for this managed resource.

Look up an 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
static get(resource_name, id, opts=None, all_tags=None, allocation_pools=None, allocation_pools_collection=None, cidr=None, description=None, dns_nameservers=None, enable_dhcp=None, gateway_ip=None, host_routes=None, ip_version=None, ipv6_address_mode=None, ipv6_ra_mode=None, name=None, network_id=None, no_gateway=None, prefix_length=None, region=None, subnetpool_id=None, tags=None, tenant_id=None, value_specs=None, __props__=None);
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)
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.

The following state arguments are supported:

AllTags List<string>

The collection of ags assigned on the subnet, which have been explicitly and implicitly added.

AllocationPools List<Pulumi.OpenStack.Networking.Inputs.SubnetAllocationPoolArgs>

A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.

AllocationPoolsCollection List<Pulumi.OpenStack.Networking.Inputs.SubnetAllocationPoolsCollectionArgs>

A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. The allocation_pools block is documented below.

Deprecated: use allocation_pool instead

Cidr string

CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.

Description string

Human-readable description of the subnet. Changing this updates the name of the existing subnet.

DnsNameservers List<string>

An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.

EnableDhcp bool

The administrative state of the network. Acceptable values are “true” and “false”. Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.

GatewayIp string

Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default gateway of .1 to be used. Changing this updates the gateway IP of the existing subnet.

HostRoutes List<Pulumi.OpenStack.Networking.Inputs.SubnetHostRouteArgs>

(Deprecated - use openstack.networking.SubnetRoute instead) An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.

Deprecated: Use openstack_networking_subnet_route_v2 instead

IpVersion int

IP version, either 4 (default) or 6. Changing this creates a new subnet.

Ipv6AddressMode string

The IPv6 address mode. Valid values are dhcpv6-stateful, dhcpv6-stateless, or slaac.

Ipv6RaMode string

The IPv6 Router Advertisement mode. Valid values are dhcpv6-stateful, dhcpv6-stateless, or slaac.

Name string

The name of the subnet. Changing this updates the name of the existing subnet.

NetworkId string

The UUID of the parent network. Changing this creates a new subnet.

NoGateway bool

Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.

PrefixLength int

The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.

Region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.

SubnetpoolId string

The ID of the subnetpool associated with the subnet.

Tags List<string>

A set of string tags for the subnet.

TenantId string

The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.

ValueSpecs Dictionary<string, object>

Map of additional options.

AllTags []string

The collection of ags assigned on the subnet, which have been explicitly and implicitly added.

AllocationPools []SubnetAllocationPool

A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.

AllocationPoolsCollection []SubnetAllocationPoolsCollection

A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. The allocation_pools block is documented below.

Deprecated: use allocation_pool instead

Cidr string

CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.

Description string

Human-readable description of the subnet. Changing this updates the name of the existing subnet.

DnsNameservers []string

An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.

EnableDhcp bool

The administrative state of the network. Acceptable values are “true” and “false”. Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.

GatewayIp string

Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default gateway of .1 to be used. Changing this updates the gateway IP of the existing subnet.

HostRoutes []SubnetHostRoute

(Deprecated - use openstack.networking.SubnetRoute instead) An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.

Deprecated: Use openstack_networking_subnet_route_v2 instead

IpVersion int

IP version, either 4 (default) or 6. Changing this creates a new subnet.

Ipv6AddressMode string

The IPv6 address mode. Valid values are dhcpv6-stateful, dhcpv6-stateless, or slaac.

Ipv6RaMode string

The IPv6 Router Advertisement mode. Valid values are dhcpv6-stateful, dhcpv6-stateless, or slaac.

Name string

The name of the subnet. Changing this updates the name of the existing subnet.

NetworkId string

The UUID of the parent network. Changing this creates a new subnet.

NoGateway bool

Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.

PrefixLength int

The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.

Region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.

SubnetpoolId string

The ID of the subnetpool associated with the subnet.

Tags []string

A set of string tags for the subnet.

TenantId string

The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.

ValueSpecs map[string]interface{}

Map of additional options.

allTags string[]

The collection of ags assigned on the subnet, which have been explicitly and implicitly added.

allocationPools SubnetAllocationPool[]

A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.

allocationPoolsCollection SubnetAllocationPoolsCollection[]

A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. The allocation_pools block is documented below.

Deprecated: use allocation_pool instead

cidr string

CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.

description string

Human-readable description of the subnet. Changing this updates the name of the existing subnet.

dnsNameservers string[]

An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.

enableDhcp boolean

The administrative state of the network. Acceptable values are “true” and “false”. Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.

gatewayIp string

Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default gateway of .1 to be used. Changing this updates the gateway IP of the existing subnet.

hostRoutes SubnetHostRoute[]

(Deprecated - use openstack.networking.SubnetRoute instead) An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.

Deprecated: Use openstack_networking_subnet_route_v2 instead

ipVersion number

IP version, either 4 (default) or 6. Changing this creates a new subnet.

ipv6AddressMode string

The IPv6 address mode. Valid values are dhcpv6-stateful, dhcpv6-stateless, or slaac.

ipv6RaMode string

The IPv6 Router Advertisement mode. Valid values are dhcpv6-stateful, dhcpv6-stateless, or slaac.

name string

The name of the subnet. Changing this updates the name of the existing subnet.

networkId string

The UUID of the parent network. Changing this creates a new subnet.

noGateway boolean

Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.

prefixLength number

The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.

region string

The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.

subnetpoolId string

The ID of the subnetpool associated with the subnet.

tags string[]

A set of string tags for the subnet.

tenantId string

The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.

valueSpecs {[key: string]: any}

Map of additional options.

all_tags List[str]

The collection of ags assigned on the subnet, which have been explicitly and implicitly added.

allocation_pools List[SubnetAllocationPool]

A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple allocation_pool blocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. The allocation_pool block is documented below.

allocation_pools_collection List[SubnetAllocationPoolsCollection]

A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. The allocation_pools block is documented below.

Deprecated: use allocation_pool instead

cidr str

CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.

description str

Human-readable description of the subnet. Changing this updates the name of the existing subnet.

dns_nameservers List[str]

An array of DNS name server names used by hosts in this subnet. Changing this updates the DNS name servers for the existing subnet.

enable_dhcp bool

The administrative state of the network. Acceptable values are “true” and “false”. Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.

gateway_ip str

Default gateway used by devices in this subnet. Leaving this blank and not setting no_gateway will cause a default gateway of .1 to be used. Changing this updates the gateway IP of the existing subnet.

host_routes List[SubnetHostRoute]

(Deprecated - use openstack.networking.SubnetRoute instead) An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.

Deprecated: Use openstack_networking_subnet_route_v2 instead

ip_version float

IP version, either 4 (default) or 6. Changing this creates a new subnet.

ipv6_address_mode str

The IPv6 address mode. Valid values are dhcpv6-stateful, dhcpv6-stateless, or slaac.

ipv6_ra_mode str

The IPv6 Router Advertisement mode. Valid values are dhcpv6-stateful, dhcpv6-stateless, or slaac.

name str

The name of the subnet. Changing this updates the name of the existing subnet.

network_id str

The UUID of the parent network. Changing this creates a new subnet.

no_gateway bool

Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.

prefix_length float

The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.

region str

The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron subnet. If omitted, the region argument of the provider is used. Changing this creates a new subnet.

subnetpool_id str

The ID of the subnetpool associated with the subnet.

tags List[str]

A set of string tags for the subnet.

tenant_id str

The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.

value_specs Dict[str, Any]

Map of additional options.

Supporting Types

SubnetAllocationPool

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

End string

The ending address.

Start string

The starting address.

End string

The ending address.

Start string

The starting address.

end string

The ending address.

start string

The starting address.

end str

The ending address.

start str

The starting address.

SubnetAllocationPoolsCollection

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

End string

The ending address.

Start string

The starting address.

End string

The ending address.

Start string

The starting address.

end string

The ending address.

start string

The starting address.

end str

The ending address.

start str

The starting address.

SubnetHostRoute

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

DestinationCidr string

The destination CIDR.

NextHop string

The next hop in the route.

DestinationCidr string

The destination CIDR.

NextHop string

The next hop in the route.

destinationCidr string

The destination CIDR.

nextHop string

The next hop in the route.

destination_cidr str

The destination CIDR.

next_hop str

The next hop in the route.

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.