UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

386 lines (385 loc) • 14.1 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages a V2 Neutron subnetpool resource within OpenStack. * * ## Example Usage * * ### Create a Subnet Pool * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const subnetpool1 = new openstack.networking.SubnetPool("subnetpool_1", { * name: "subnetpool_1", * ipVersion: 6, * prefixes: [ * "fdf7:b13d:dead:beef::/64", * "fd65:86cc:a334:39b7::/64", * ], * }); * ``` * * ### Create a Subnet from a Subnet Pool * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const network1 = new openstack.networking.Network("network_1", { * name: "network_1", * adminStateUp: true, * }); * const subnetpool1 = new openstack.networking.SubnetPool("subnetpool_1", { * name: "subnetpool_1", * prefixes: ["10.11.12.0/24"], * }); * const subnet1 = new openstack.networking.Subnet("subnet_1", { * name: "subnet_1", * cidr: "10.11.12.0/25", * networkId: network1.id, * subnetpoolId: subnetpool1.id, * }); * ``` * * ## Import * * Subnetpools can be imported using the `id`, e.g. * * ```sh * $ pulumi import openstack:networking/subnetPool:SubnetPool subnetpool_1 832cb7f3-59fe-40cf-8f64-8350ffc03272 * ``` */ export declare class SubnetPool extends pulumi.CustomResource { /** * Get an existing SubnetPool resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SubnetPoolState, opts?: pulumi.CustomResourceOptions): SubnetPool; /** * Returns true if the given object is an instance of SubnetPool. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is SubnetPool; /** * The Neutron address scope to assign to the * subnetpool. Changing this updates the address scope id of the existing * subnetpool. */ readonly addressScopeId: pulumi.Output<string | undefined>; /** * The collection of tags assigned on the subnetpool, which have been * explicitly and implicitly added. */ readonly allTags: pulumi.Output<string[]>; /** * The time at which subnetpool was created. */ readonly createdAt: pulumi.Output<string>; /** * 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. */ readonly defaultPrefixlen: pulumi.Output<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. */ readonly defaultQuota: pulumi.Output<number | undefined>; /** * The human-readable description for the subnetpool. * Changing this updates the description of the existing subnetpool. */ readonly description: pulumi.Output<string | undefined>; /** * The IP protocol version. */ readonly ipVersion: pulumi.Output<number>; /** * Indicates whether the subnetpool is default * subnetpool or not. Changing this updates the default status of the existing * subnetpool. */ readonly isDefault: pulumi.Output<boolean | undefined>; /** * 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. */ readonly maxPrefixlen: pulumi.Output<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. */ readonly minPrefixlen: pulumi.Output<number>; /** * The name of the subnetpool. Changing this updates the name of * the existing subnetpool. */ readonly name: pulumi.Output<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. */ readonly prefixes: pulumi.Output<string[]>; /** * The owner of the subnetpool. Required if admin wants to * create a subnetpool for another project. Changing this creates a new subnetpool. */ readonly projectId: pulumi.Output<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. */ readonly region: pulumi.Output<string>; /** * The revision number of the subnetpool. */ readonly revisionNumber: pulumi.Output<number>; /** * Indicates whether this subnetpool is shared across * all projects. Changing this updates the shared status of the existing * subnetpool. */ readonly shared: pulumi.Output<boolean | undefined>; /** * A set of string tags for the subnetpool. */ readonly tags: pulumi.Output<string[] | undefined>; /** * The time at which subnetpool was created. */ readonly updatedAt: pulumi.Output<string>; /** * Map of additional options. */ readonly valueSpecs: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Create a SubnetPool resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: SubnetPoolArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering SubnetPool resources. */ export interface SubnetPoolState { /** * The Neutron address scope to assign to the * subnetpool. Changing this updates the address scope id of the existing * subnetpool. */ addressScopeId?: pulumi.Input<string>; /** * The collection of tags assigned on the subnetpool, which have been * explicitly and implicitly added. */ allTags?: pulumi.Input<pulumi.Input<string>[]>; /** * The time at which subnetpool was created. */ createdAt?: pulumi.Input<string>; /** * 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. */ defaultPrefixlen?: pulumi.Input<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. */ defaultQuota?: pulumi.Input<number>; /** * The human-readable description for the subnetpool. * Changing this updates the description of the existing subnetpool. */ description?: pulumi.Input<string>; /** * The IP protocol version. */ ipVersion?: pulumi.Input<number>; /** * Indicates whether the subnetpool is default * subnetpool or not. Changing this updates the default status of the existing * subnetpool. */ isDefault?: pulumi.Input<boolean>; /** * 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. */ maxPrefixlen?: pulumi.Input<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. */ minPrefixlen?: pulumi.Input<number>; /** * The name of the subnetpool. Changing this updates the name of * the existing subnetpool. */ name?: pulumi.Input<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. */ prefixes?: pulumi.Input<pulumi.Input<string>[]>; /** * The owner of the subnetpool. Required if admin wants to * create a subnetpool for another project. Changing this creates a new subnetpool. */ projectId?: pulumi.Input<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. */ region?: pulumi.Input<string>; /** * The revision number of the subnetpool. */ revisionNumber?: pulumi.Input<number>; /** * Indicates whether this subnetpool is shared across * all projects. Changing this updates the shared status of the existing * subnetpool. */ shared?: pulumi.Input<boolean>; /** * A set of string tags for the subnetpool. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * The time at which subnetpool was created. */ updatedAt?: pulumi.Input<string>; /** * Map of additional options. */ valueSpecs?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; } /** * The set of arguments for constructing a SubnetPool resource. */ export interface SubnetPoolArgs { /** * The Neutron address scope to assign to the * subnetpool. Changing this updates the address scope id of the existing * subnetpool. */ addressScopeId?: pulumi.Input<string>; /** * 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. */ defaultPrefixlen?: pulumi.Input<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. */ defaultQuota?: pulumi.Input<number>; /** * The human-readable description for the subnetpool. * Changing this updates the description of the existing subnetpool. */ description?: pulumi.Input<string>; /** * The IP protocol version. */ ipVersion?: pulumi.Input<number>; /** * Indicates whether the subnetpool is default * subnetpool or not. Changing this updates the default status of the existing * subnetpool. */ isDefault?: pulumi.Input<boolean>; /** * 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. */ maxPrefixlen?: pulumi.Input<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. */ minPrefixlen?: pulumi.Input<number>; /** * The name of the subnetpool. Changing this updates the name of * the existing subnetpool. */ name?: pulumi.Input<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. */ prefixes: pulumi.Input<pulumi.Input<string>[]>; /** * The owner of the subnetpool. Required if admin wants to * create a subnetpool for another project. Changing this creates a new subnetpool. */ projectId?: pulumi.Input<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. */ region?: pulumi.Input<string>; /** * Indicates whether this subnetpool is shared across * all projects. Changing this updates the shared status of the existing * subnetpool. */ shared?: pulumi.Input<boolean>; /** * A set of string tags for the subnetpool. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * Map of additional options. */ valueSpecs?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; }