@pulumi/linode
Version:
A Pulumi package for creating and managing linode cloud resources.
178 lines (177 loc) • 6.07 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Manages a Linode VPC subnet.
* For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/post-vpc-subnet).
*
* ## Example Usage
*
* Create a VPC subnet:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as linode from "@pulumi/linode";
*
* const test = new linode.VpcSubnet("test", {
* vpcId: 123,
* label: "test-subnet",
* ipv4: "10.0.0.0/24",
* });
* ```
*
* Create a VPC subnet with an implicitly determined IPv6 range:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as linode from "@pulumi/linode";
*
* const testVpc = new linode.Vpc("test", {
* label: "test-vpc",
* region: "us-mia",
* ipv6s: [{
* range: "/52",
* }],
* });
* // NOTE: IPv6 VPCs may not currently be available to all users.
* const test = new linode.VpcSubnet("test", {
* vpcId: testVpc.id,
* label: "test-subnet",
* ipv4: "10.0.0.0/24",
* ipv6s: [{
* range: "auto",
* }],
* });
* ```
*
* ## IPv6
*
* > **Limited Availability** IPv6 VPCs may not currently be available to all users.
*
* The following arguments can be configured for each entry under the `ipv6` field:
*
* * `range` - (Optional) An existing IPv6 prefix owned by the current account or a forward slash (/) followed by a valid prefix length. If `auto`, a range with the default prefix will be allocated for this VPC.
*
* * `allocatedRange` - (Read-Only) The value of range computed by the API. This is necessary when needing to access the range for an implicit allocation.
*
* ## Import
*
* Linode Virtual Private Cloud (VPC) Subnet can be imported using the `vpc_id` followed by the subnet `id` separated by a comma, e.g.
*
* ```sh
* $ pulumi import linode:index/vpcSubnet:VpcSubnet my_subnet_duplicated 1234567,7654321
* ```
*/
export declare class VpcSubnet extends pulumi.CustomResource {
/**
* Get an existing VpcSubnet 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?: VpcSubnetState, opts?: pulumi.CustomResourceOptions): VpcSubnet;
/**
* Returns true if the given object is an instance of VpcSubnet. 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 VpcSubnet;
/**
* The date and time when the VPC was created.
*/
readonly created: pulumi.Output<string>;
/**
* The IPv4 range of this subnet in CIDR format.
*
* * `ipv6` - (Optional) A list of IPv6 ranges under this VPC subnet. NOTE: IPv6 VPCs may not currently be available to all users.
*/
readonly ipv4: pulumi.Output<string | undefined>;
/**
* The IPv6 ranges of this subnet.
*/
readonly ipv6s: pulumi.Output<outputs.VpcSubnetIpv6[] | undefined>;
/**
* The label of the VPC. Only contains ASCII letters, digits and dashes.
*/
readonly label: pulumi.Output<string>;
/**
* A list of Linode that added to this subnet.
*/
readonly linodes: pulumi.Output<outputs.VpcSubnetLinode[]>;
/**
* The date and time when the VPC was last updated.
*/
readonly updated: pulumi.Output<string>;
/**
* The id of the parent VPC for this VPC subnet.
*/
readonly vpcId: pulumi.Output<number>;
/**
* Create a VpcSubnet 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: VpcSubnetArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering VpcSubnet resources.
*/
export interface VpcSubnetState {
/**
* The date and time when the VPC was created.
*/
created?: pulumi.Input<string>;
/**
* The IPv4 range of this subnet in CIDR format.
*
* * `ipv6` - (Optional) A list of IPv6 ranges under this VPC subnet. NOTE: IPv6 VPCs may not currently be available to all users.
*/
ipv4?: pulumi.Input<string>;
/**
* The IPv6 ranges of this subnet.
*/
ipv6s?: pulumi.Input<pulumi.Input<inputs.VpcSubnetIpv6>[]>;
/**
* The label of the VPC. Only contains ASCII letters, digits and dashes.
*/
label?: pulumi.Input<string>;
/**
* A list of Linode that added to this subnet.
*/
linodes?: pulumi.Input<pulumi.Input<inputs.VpcSubnetLinode>[]>;
/**
* The date and time when the VPC was last updated.
*/
updated?: pulumi.Input<string>;
/**
* The id of the parent VPC for this VPC subnet.
*/
vpcId?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a VpcSubnet resource.
*/
export interface VpcSubnetArgs {
/**
* The IPv4 range of this subnet in CIDR format.
*
* * `ipv6` - (Optional) A list of IPv6 ranges under this VPC subnet. NOTE: IPv6 VPCs may not currently be available to all users.
*/
ipv4?: pulumi.Input<string>;
/**
* The IPv6 ranges of this subnet.
*/
ipv6s?: pulumi.Input<pulumi.Input<inputs.VpcSubnetIpv6>[]>;
/**
* The label of the VPC. Only contains ASCII letters, digits and dashes.
*/
label: pulumi.Input<string>;
/**
* The id of the parent VPC for this VPC subnet.
*/
vpcId: pulumi.Input<number>;
}