Class 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",
},
});
}
}
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,
});
}
}
Inherited Members
Namespace: Pulumi.OpenStack.Networking
Assembly: Pulumi.OpenStack.dll
Syntax
public class SubnetPool : CustomResource
Constructors
View SourceSubnetPool(String, SubnetPoolArgs, CustomResourceOptions)
Create a SubnetPool resource with the given unique name, arguments, and options.
Declaration
public SubnetPool(string name, SubnetPoolArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| SubnetPoolArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAddressScopeId
The Neutron address scope to assign to the subnetpool. Changing this updates the address scope id of the existing subnetpool.
Declaration
public Output<string> AddressScopeId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AllTags
The collection of tags assigned on the subnetpool, which have been explicitly and implicitly added.
Declaration
public Output<ImmutableArray<string>> AllTags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
CreatedAt
The time at which subnetpool was created.
Declaration
public Output<string> CreatedAt { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DefaultPrefixlen
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.
Declaration
public Output<int> DefaultPrefixlen { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
DefaultQuota
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.
Declaration
public Output<int?> DefaultQuota { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Description
The human-readable description for the subnetpool. Changing this updates the description of the existing subnetpool.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
IpVersion
The IP protocol version.
Declaration
public Output<int> IpVersion { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
IsDefault
Indicates whether the subnetpool is default subnetpool or not. Changing this updates the default status of the existing subnetpool.
Declaration
public Output<bool?> IsDefault { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
MaxPrefixlen
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.
Declaration
public Output<int> MaxPrefixlen { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
MinPrefixlen
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.
Declaration
public Output<int> MinPrefixlen { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Name
The name of the subnetpool. Changing this updates the name of the existing subnetpool.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Prefixes
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.
Declaration
public Output<ImmutableArray<string>> Prefixes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
ProjectId
The owner of the subnetpool. Required if admin wants to create a subnetpool for another project. Changing this creates a new subnetpool.
Declaration
public Output<string> ProjectId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Region
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.
Declaration
public Output<string> Region { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RevisionNumber
The revision number of the subnetpool.
Declaration
public Output<int> RevisionNumber { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Shared
Indicates whether this subnetpool is shared across all projects. Changing this updates the shared status of the existing subnetpool.
Declaration
public Output<bool?> Shared { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Tags
A set of string tags for the subnetpool.
Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
UpdatedAt
The time at which subnetpool was created.
Declaration
public Output<string> UpdatedAt { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ValueSpecs
Map of additional options.
Declaration
public Output<ImmutableDictionary<string, object>> ValueSpecs { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Methods
View SourceGet(String, Input<String>, SubnetPoolState, CustomResourceOptions)
Get an existing SubnetPool resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static SubnetPool Get(string name, Input<string> id, SubnetPoolState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| SubnetPoolState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| SubnetPool |