UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

135 lines (134 loc) 5.22 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages an IEC VPC resource within HuaweiCloud. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const vpcName = config.requireObject("vpcName"); * const vpcCidr = config.requireObject("vpcCidr"); * const vpc = new huaweicloud.iec.Vpc("vpc", {cidr: vpcCidr}); * const vpcByCustomer = new huaweicloud.iec.Vpc("vpcByCustomer", { * cidr: vpcCidr, * mode: "CUSTOMER", * }); * ``` * * ## Import * * VPCs can be imported using the `id`, e.g. bash * * ```sh * $ pulumi import huaweicloud:Iec/vpc:Vpc myvpc 7117d38e-4c8f-4624-a505-bd96b97d024c * ``` */ export declare class Vpc extends pulumi.CustomResource { /** * Get an existing Vpc 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?: VpcState, opts?: pulumi.CustomResourceOptions): Vpc; /** * Returns true if the given object is an instance of Vpc. 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 Vpc; /** * Specifies the IP address range for the VPC. The subnet IP address in the VPC must be * within the IP address range of the VPC. The following CIDR blocks are supported: * *10.0.0.0/8-16*, *172.16.0.0/12-16*, *192.168.0.0/16*. */ readonly cidr: pulumi.Output<string>; /** * Specifies the mode of the IEC VPC. Possible values are "SYSTEM" and "CUSTOMER", * defaults to "SYSTEM". Changing this creates a new IEC VPC. */ readonly mode: pulumi.Output<string | undefined>; /** * Specifies the name of the IEC VPC. The name can contain a maximum of 64 characters. Only * letters, digits, underscores (_), hyphens (-), and periods (.) are allowed. */ readonly name: pulumi.Output<string>; /** * The region in which to create the IEC VPC. If omitted, the provider-level * region will be used. Changing this creates a new resource. */ readonly region: pulumi.Output<string | undefined>; /** * Indicates the number of subnets. */ readonly subnetNum: pulumi.Output<number>; /** * Create a Vpc 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: VpcArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Vpc resources. */ export interface VpcState { /** * Specifies the IP address range for the VPC. The subnet IP address in the VPC must be * within the IP address range of the VPC. The following CIDR blocks are supported: * *10.0.0.0/8-16*, *172.16.0.0/12-16*, *192.168.0.0/16*. */ cidr?: pulumi.Input<string>; /** * Specifies the mode of the IEC VPC. Possible values are "SYSTEM" and "CUSTOMER", * defaults to "SYSTEM". Changing this creates a new IEC VPC. */ mode?: pulumi.Input<string>; /** * Specifies the name of the IEC VPC. The name can contain a maximum of 64 characters. Only * letters, digits, underscores (_), hyphens (-), and periods (.) are allowed. */ name?: pulumi.Input<string>; /** * The region in which to create the IEC VPC. If omitted, the provider-level * region will be used. Changing this creates a new resource. */ region?: pulumi.Input<string>; /** * Indicates the number of subnets. */ subnetNum?: pulumi.Input<number>; } /** * The set of arguments for constructing a Vpc resource. */ export interface VpcArgs { /** * Specifies the IP address range for the VPC. The subnet IP address in the VPC must be * within the IP address range of the VPC. The following CIDR blocks are supported: * *10.0.0.0/8-16*, *172.16.0.0/12-16*, *192.168.0.0/16*. */ cidr: pulumi.Input<string>; /** * Specifies the mode of the IEC VPC. Possible values are "SYSTEM" and "CUSTOMER", * defaults to "SYSTEM". Changing this creates a new IEC VPC. */ mode?: pulumi.Input<string>; /** * Specifies the name of the IEC VPC. The name can contain a maximum of 64 characters. Only * letters, digits, underscores (_), hyphens (-), and periods (.) are allowed. */ name?: pulumi.Input<string>; /** * The region in which to create the IEC VPC. If omitted, the provider-level * region will be used. Changing this creates a new resource. */ region?: pulumi.Input<string>; }