SubnetPool

Manages a V2 Neutron subnetpool resource within OpenStack.

Example Usage

Create a Subnet Pool

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var subnetpool1 = new OpenStack.Networking.SubnetPool("subnetpool1", new OpenStack.Networking.SubnetPoolArgs
        {
            IpVersion = 6,
            Prefixes = 
            {
                "fdf7:b13d:dead:beef::/64",
                "fd65:86cc:a334:39b7::/64",
            },
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

subnetpool1 = openstack.networking.SubnetPool("subnetpool1",
    ip_version=6,
    prefixes=[
        "fdf7:b13d:dead:beef::/64",
        "fd65:86cc:a334:39b7::/64",
    ])
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const subnetpool1 = new openstack.networking.SubnetPool("subnetpool_1", {
    ipVersion: 6,
    prefixes: [
        "fdf7:b13d:dead:beef::/64",
        "fd65:86cc:a334:39b7::/64",
    ],
});

Create a Subnet from a Subnet Pool

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 subnetpool1 = new OpenStack.Networking.SubnetPool("subnetpool1", new OpenStack.Networking.SubnetPoolArgs
        {
            Prefixes = 
            {
                "10.11.12.0/24",
            },
        });
        var subnet1 = new OpenStack.Networking.Subnet("subnet1", new OpenStack.Networking.SubnetArgs
        {
            Cidr = "10.11.12.0/25",
            NetworkId = network1.Id,
            SubnetpoolId = subnetpool1.Id,
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

network1 = openstack.networking.Network("network1", admin_state_up="true")
subnetpool1 = openstack.networking.SubnetPool("subnetpool1", prefixes=["10.11.12.0/24"])
subnet1 = openstack.networking.Subnet("subnet1",
    cidr="10.11.12.0/25",
    network_id=network1.id,
    subnetpool_id=subnetpool1.id)
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const network1 = new openstack.networking.Network("network_1", {
    adminStateUp: true,
});
const subnetpool1 = new openstack.networking.SubnetPool("subnetpool_1", {
    prefixes: ["10.11.12.0/24"],
});
const subnet1 = new openstack.networking.Subnet("subnet_1", {
    cidr: "10.11.12.0/25",
    networkId: network1.id,
    subnetpoolId: subnetpool1.id,
});

Create a SubnetPool Resource

def SubnetPool(resource_name, opts=None, address_scope_id=None, default_prefixlen=None, default_quota=None, description=None, ip_version=None, is_default=None, max_prefixlen=None, min_prefixlen=None, name=None, prefixes=None, project_id=None, region=None, shared=None, tags=None, value_specs=None, __props__=None);
func NewSubnetPool(ctx *Context, name string, args SubnetPoolArgs, opts ...ResourceOption) (*SubnetPool, error)
public SubnetPool(string name, SubnetPoolArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args SubnetPoolArgs
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 SubnetPoolArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SubnetPoolArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

SubnetPool Resource Properties

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

Inputs

The SubnetPool resource accepts the following input properties:

Prefixes List<string>

A list of subnet prefixes to assign to the subnetpool. Neutron API merges adjacent prefixes and treats them as a single prefix. Each subnet prefix must be unique among all subnet prefixes in all subnetpools that are associated with the address scope. Changing this updates the prefixes list of the existing subnetpool.

AddressScopeId string

The Neutron address scope to assign to the subnetpool. Changing this updates the address scope id of the existing subnetpool.

DefaultPrefixlen int

The size of the prefix to allocate when the cidr or prefixlen attributes are omitted when you create the subnet. Defaults to the MinPrefixLen. Changing this updates the default prefixlen of the existing subnetpool.

DefaultQuota int

The per-project quota on the prefix space that can be allocated from the subnetpool for project subnets. Changing this updates the default quota of the existing subnetpool.

Description string

The human-readable description for the subnetpool. Changing this updates the description of the existing subnetpool.

IpVersion int

The IP protocol version.

IsDefault bool

Indicates whether the subnetpool is default subnetpool or not. Changing this updates the default status of the existing subnetpool.

MaxPrefixlen int

The maximum prefix size that can be allocated from the subnetpool. For IPv4 subnetpools, default is 32. For IPv6 subnetpools, default is 128. Changing this updates the max prefixlen of the existing subnetpool.

MinPrefixlen int

The smallest prefix that can be allocated from a subnetpool. For IPv4 subnetpools, default is 8. For IPv6 subnetpools, default is 64. Changing this updates the min prefixlen of the existing subnetpool.

Name string

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

ProjectId string

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

Region string

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

Shared bool

Indicates whether this subnetpool is shared across all projects. Changing this updates the shared status of the existing subnetpool.

Tags List<string>

A set of string tags for the subnetpool.

ValueSpecs Dictionary<string, object>

Map of additional options.

Prefixes []string

A list of subnet prefixes to assign to the subnetpool. Neutron API merges adjacent prefixes and treats them as a single prefix. Each subnet prefix must be unique among all subnet prefixes in all subnetpools that are associated with the address scope. Changing this updates the prefixes list of the existing subnetpool.

AddressScopeId string

The Neutron address scope to assign to the subnetpool. Changing this updates the address scope id of the existing subnetpool.

DefaultPrefixlen int

The size of the prefix to allocate when the cidr or prefixlen attributes are omitted when you create the subnet. Defaults to the MinPrefixLen. Changing this updates the default prefixlen of the existing subnetpool.

DefaultQuota int

The per-project quota on the prefix space that can be allocated from the subnetpool for project subnets. Changing this updates the default quota of the existing subnetpool.

Description string

The human-readable description for the subnetpool. Changing this updates the description of the existing subnetpool.

IpVersion int

The IP protocol version.

IsDefault bool

Indicates whether the subnetpool is default subnetpool or not. Changing this updates the default status of the existing subnetpool.

MaxPrefixlen int

The maximum prefix size that can be allocated from the subnetpool. For IPv4 subnetpools, default is 32. For IPv6 subnetpools, default is 128. Changing this updates the max prefixlen of the existing subnetpool.

MinPrefixlen int

The smallest prefix that can be allocated from a subnetpool. For IPv4 subnetpools, default is 8. For IPv6 subnetpools, default is 64. Changing this updates the min prefixlen of the existing subnetpool.

Name string

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

ProjectId string

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

Region string

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

Shared bool

Indicates whether this subnetpool is shared across all projects. Changing this updates the shared status of the existing subnetpool.

Tags []string

A set of string tags for the subnetpool.

ValueSpecs map[string]interface{}

Map of additional options.

prefixes string[]

A list of subnet prefixes to assign to the subnetpool. Neutron API merges adjacent prefixes and treats them as a single prefix. Each subnet prefix must be unique among all subnet prefixes in all subnetpools that are associated with the address scope. Changing this updates the prefixes list of the existing subnetpool.

addressScopeId string

The Neutron address scope to assign to the subnetpool. Changing this updates the address scope id of the existing subnetpool.

defaultPrefixlen number

The size of the prefix to allocate when the cidr or prefixlen attributes are omitted when you create the subnet. Defaults to the MinPrefixLen. Changing this updates the default prefixlen of the existing subnetpool.

defaultQuota number

The per-project quota on the prefix space that can be allocated from the subnetpool for project subnets. Changing this updates the default quota of the existing subnetpool.

description string

The human-readable description for the subnetpool. Changing this updates the description of the existing subnetpool.

ipVersion number

The IP protocol version.

isDefault boolean

Indicates whether the subnetpool is default subnetpool or not. Changing this updates the default status of the existing subnetpool.

maxPrefixlen number

The maximum prefix size that can be allocated from the subnetpool. For IPv4 subnetpools, default is 32. For IPv6 subnetpools, default is 128. Changing this updates the max prefixlen of the existing subnetpool.

minPrefixlen number

The smallest prefix that can be allocated from a subnetpool. For IPv4 subnetpools, default is 8. For IPv6 subnetpools, default is 64. Changing this updates the min prefixlen of the existing subnetpool.

name string

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

projectId string

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

region string

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

shared boolean

Indicates whether this subnetpool is shared across all projects. Changing this updates the shared status of the existing subnetpool.

tags string[]

A set of string tags for the subnetpool.

valueSpecs {[key: string]: any}

Map of additional options.

prefixes List[str]

A list of subnet prefixes to assign to the subnetpool. Neutron API merges adjacent prefixes and treats them as a single prefix. Each subnet prefix must be unique among all subnet prefixes in all subnetpools that are associated with the address scope. Changing this updates the prefixes list of the existing subnetpool.

address_scope_id str

The Neutron address scope to assign to the subnetpool. Changing this updates the address scope id of the existing subnetpool.

default_prefixlen float

The size of the prefix to allocate when the cidr or prefixlen attributes are omitted when you create the subnet. Defaults to the MinPrefixLen. Changing this updates the default prefixlen of the existing subnetpool.

default_quota float

The per-project quota on the prefix space that can be allocated from the subnetpool for project subnets. Changing this updates the default quota of the existing subnetpool.

description str

The human-readable description for the subnetpool. Changing this updates the description of the existing subnetpool.

ip_version float

The IP protocol version.

is_default bool

Indicates whether the subnetpool is default subnetpool or not. Changing this updates the default status of the existing subnetpool.

max_prefixlen float

The maximum prefix size that can be allocated from the subnetpool. For IPv4 subnetpools, default is 32. For IPv6 subnetpools, default is 128. Changing this updates the max prefixlen of the existing subnetpool.

min_prefixlen float

The smallest prefix that can be allocated from a subnetpool. For IPv4 subnetpools, default is 8. For IPv6 subnetpools, default is 64. Changing this updates the min prefixlen of the existing subnetpool.

name str

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

project_id str

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

region str

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

shared bool

Indicates whether this subnetpool is shared across all projects. Changing this updates the shared status of the existing subnetpool.

tags List[str]

A set of string tags for the subnetpool.

value_specs Dict[str, Any]

Map of additional options.

Outputs

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

AllTags List<string>

The collection of tags assigned on the subnetpool, which have been explicitly and implicitly added.

CreatedAt string

The time at which subnetpool was created.

Id string
The provider-assigned unique ID for this managed resource.
RevisionNumber int

The revision number of the subnetpool.

UpdatedAt string

The time at which subnetpool was created.

AllTags []string

The collection of tags assigned on the subnetpool, which have been explicitly and implicitly added.

CreatedAt string

The time at which subnetpool was created.

Id string
The provider-assigned unique ID for this managed resource.
RevisionNumber int

The revision number of the subnetpool.

UpdatedAt string

The time at which subnetpool was created.

allTags string[]

The collection of tags assigned on the subnetpool, which have been explicitly and implicitly added.

createdAt string

The time at which subnetpool was created.

id string
The provider-assigned unique ID for this managed resource.
revisionNumber number

The revision number of the subnetpool.

updatedAt string

The time at which subnetpool was created.

all_tags List[str]

The collection of tags assigned on the subnetpool, which have been explicitly and implicitly added.

created_at str

The time at which subnetpool was created.

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

The revision number of the subnetpool.

updated_at str

The time at which subnetpool was created.

Look up an Existing SubnetPool Resource

Get an existing SubnetPool 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?: SubnetPoolState, opts?: CustomResourceOptions): SubnetPool
static get(resource_name, id, opts=None, address_scope_id=None, all_tags=None, created_at=None, default_prefixlen=None, default_quota=None, description=None, ip_version=None, is_default=None, max_prefixlen=None, min_prefixlen=None, name=None, prefixes=None, project_id=None, region=None, revision_number=None, shared=None, tags=None, updated_at=None, value_specs=None, __props__=None);
func GetSubnetPool(ctx *Context, name string, id IDInput, state *SubnetPoolState, opts ...ResourceOption) (*SubnetPool, error)
public static SubnetPool Get(string name, Input<string> id, SubnetPoolState? 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:

AddressScopeId string

The Neutron address scope to assign to the subnetpool. Changing this updates the address scope id of the existing subnetpool.

AllTags List<string>

The collection of tags assigned on the subnetpool, which have been explicitly and implicitly added.

CreatedAt string

The time at which subnetpool was created.

DefaultPrefixlen int

The size of the prefix to allocate when the cidr or prefixlen attributes are omitted when you create the subnet. Defaults to the MinPrefixLen. Changing this updates the default prefixlen of the existing subnetpool.

DefaultQuota int

The per-project quota on the prefix space that can be allocated from the subnetpool for project subnets. Changing this updates the default quota of the existing subnetpool.

Description string

The human-readable description for the subnetpool. Changing this updates the description of the existing subnetpool.

IpVersion int

The IP protocol version.

IsDefault bool

Indicates whether the subnetpool is default subnetpool or not. Changing this updates the default status of the existing subnetpool.

MaxPrefixlen int

The maximum prefix size that can be allocated from the subnetpool. For IPv4 subnetpools, default is 32. For IPv6 subnetpools, default is 128. Changing this updates the max prefixlen of the existing subnetpool.

MinPrefixlen int

The smallest prefix that can be allocated from a subnetpool. For IPv4 subnetpools, default is 8. For IPv6 subnetpools, default is 64. Changing this updates the min prefixlen of the existing subnetpool.

Name string

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

Prefixes List<string>

A list of subnet prefixes to assign to the subnetpool. Neutron API merges adjacent prefixes and treats them as a single prefix. Each subnet prefix must be unique among all subnet prefixes in all subnetpools that are associated with the address scope. Changing this updates the prefixes list of the existing subnetpool.

ProjectId string

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

Region string

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

RevisionNumber int

The revision number of the subnetpool.

Shared bool

Indicates whether this subnetpool is shared across all projects. Changing this updates the shared status of the existing subnetpool.

Tags List<string>

A set of string tags for the subnetpool.

UpdatedAt string

The time at which subnetpool was created.

ValueSpecs Dictionary<string, object>

Map of additional options.

AddressScopeId string

The Neutron address scope to assign to the subnetpool. Changing this updates the address scope id of the existing subnetpool.

AllTags []string

The collection of tags assigned on the subnetpool, which have been explicitly and implicitly added.

CreatedAt string

The time at which subnetpool was created.

DefaultPrefixlen int

The size of the prefix to allocate when the cidr or prefixlen attributes are omitted when you create the subnet. Defaults to the MinPrefixLen. Changing this updates the default prefixlen of the existing subnetpool.

DefaultQuota int

The per-project quota on the prefix space that can be allocated from the subnetpool for project subnets. Changing this updates the default quota of the existing subnetpool.

Description string

The human-readable description for the subnetpool. Changing this updates the description of the existing subnetpool.

IpVersion int

The IP protocol version.

IsDefault bool

Indicates whether the subnetpool is default subnetpool or not. Changing this updates the default status of the existing subnetpool.

MaxPrefixlen int

The maximum prefix size that can be allocated from the subnetpool. For IPv4 subnetpools, default is 32. For IPv6 subnetpools, default is 128. Changing this updates the max prefixlen of the existing subnetpool.

MinPrefixlen int

The smallest prefix that can be allocated from a subnetpool. For IPv4 subnetpools, default is 8. For IPv6 subnetpools, default is 64. Changing this updates the min prefixlen of the existing subnetpool.

Name string

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

Prefixes []string

A list of subnet prefixes to assign to the subnetpool. Neutron API merges adjacent prefixes and treats them as a single prefix. Each subnet prefix must be unique among all subnet prefixes in all subnetpools that are associated with the address scope. Changing this updates the prefixes list of the existing subnetpool.

ProjectId string

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

Region string

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

RevisionNumber int

The revision number of the subnetpool.

Shared bool

Indicates whether this subnetpool is shared across all projects. Changing this updates the shared status of the existing subnetpool.

Tags []string

A set of string tags for the subnetpool.

UpdatedAt string

The time at which subnetpool was created.

ValueSpecs map[string]interface{}

Map of additional options.

addressScopeId string

The Neutron address scope to assign to the subnetpool. Changing this updates the address scope id of the existing subnetpool.

allTags string[]

The collection of tags assigned on the subnetpool, which have been explicitly and implicitly added.

createdAt string

The time at which subnetpool was created.

defaultPrefixlen number

The size of the prefix to allocate when the cidr or prefixlen attributes are omitted when you create the subnet. Defaults to the MinPrefixLen. Changing this updates the default prefixlen of the existing subnetpool.

defaultQuota number

The per-project quota on the prefix space that can be allocated from the subnetpool for project subnets. Changing this updates the default quota of the existing subnetpool.

description string

The human-readable description for the subnetpool. Changing this updates the description of the existing subnetpool.

ipVersion number

The IP protocol version.

isDefault boolean

Indicates whether the subnetpool is default subnetpool or not. Changing this updates the default status of the existing subnetpool.

maxPrefixlen number

The maximum prefix size that can be allocated from the subnetpool. For IPv4 subnetpools, default is 32. For IPv6 subnetpools, default is 128. Changing this updates the max prefixlen of the existing subnetpool.

minPrefixlen number

The smallest prefix that can be allocated from a subnetpool. For IPv4 subnetpools, default is 8. For IPv6 subnetpools, default is 64. Changing this updates the min prefixlen of the existing subnetpool.

name string

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

prefixes string[]

A list of subnet prefixes to assign to the subnetpool. Neutron API merges adjacent prefixes and treats them as a single prefix. Each subnet prefix must be unique among all subnet prefixes in all subnetpools that are associated with the address scope. Changing this updates the prefixes list of the existing subnetpool.

projectId string

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

region string

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

revisionNumber number

The revision number of the subnetpool.

shared boolean

Indicates whether this subnetpool is shared across all projects. Changing this updates the shared status of the existing subnetpool.

tags string[]

A set of string tags for the subnetpool.

updatedAt string

The time at which subnetpool was created.

valueSpecs {[key: string]: any}

Map of additional options.

address_scope_id str

The Neutron address scope to assign to the subnetpool. Changing this updates the address scope id of the existing subnetpool.

all_tags List[str]

The collection of tags assigned on the subnetpool, which have been explicitly and implicitly added.

created_at str

The time at which subnetpool was created.

default_prefixlen float

The size of the prefix to allocate when the cidr or prefixlen attributes are omitted when you create the subnet. Defaults to the MinPrefixLen. Changing this updates the default prefixlen of the existing subnetpool.

default_quota float

The per-project quota on the prefix space that can be allocated from the subnetpool for project subnets. Changing this updates the default quota of the existing subnetpool.

description str

The human-readable description for the subnetpool. Changing this updates the description of the existing subnetpool.

ip_version float

The IP protocol version.

is_default bool

Indicates whether the subnetpool is default subnetpool or not. Changing this updates the default status of the existing subnetpool.

max_prefixlen float

The maximum prefix size that can be allocated from the subnetpool. For IPv4 subnetpools, default is 32. For IPv6 subnetpools, default is 128. Changing this updates the max prefixlen of the existing subnetpool.

min_prefixlen float

The smallest prefix that can be allocated from a subnetpool. For IPv4 subnetpools, default is 8. For IPv6 subnetpools, default is 64. Changing this updates the min prefixlen of the existing subnetpool.

name str

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

prefixes List[str]

A list of subnet prefixes to assign to the subnetpool. Neutron API merges adjacent prefixes and treats them as a single prefix. Each subnet prefix must be unique among all subnet prefixes in all subnetpools that are associated with the address scope. Changing this updates the prefixes list of the existing subnetpool.

project_id str

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

region str

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

revision_number float

The revision number of the subnetpool.

shared bool

Indicates whether this subnetpool is shared across all projects. Changing this updates the shared status of the existing subnetpool.

tags List[str]

A set of string tags for the subnetpool.

updated_at str

The time at which subnetpool was created.

value_specs Dict[str, Any]

Map of additional options.

Package Details

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