UNPKG

@ediri/vultr

Version:

A Pulumi package for creating and managing Vultr cloud resources.

103 lines 3.9 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Vpc2 = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ** Deprecated: Use `vultr.Vpc` instead ** * * Provides a Vultr VPC 2.0 resource. This can be used to create, read, and delete VPCs 2.0 on your Vultr account. * * ## Example Usage * * Create a new VPC 2.0 with an automatically generated CIDR block: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vultr from "@ediri/vultr"; * * const myVpc2 = new vultr.Vpc2("myVpc2", { * description: "my vpc2", * region: "ewr", * }); * ``` * * Create a new VPC 2.0 with a specified CIDR block: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vultr from "@ediri/vultr"; * * const myVpc2 = new vultr.Vpc2("myVpc2", { * description: "my private vpc2", * ipBlock: "10.0.0.0", * prefixLength: 24, * region: "ewr", * }); * ``` * * ## Import * * VPCs 2.0 can be imported using the VPC 2.0 `ID`, e.g. * * ```sh * $ pulumi import vultr:index/vpc2:Vpc2 my_vpc2 0e04f918-575e-41cb-86f6-d729b354a5a1 * ``` */ class Vpc2 extends pulumi.CustomResource { /** * Get an existing Vpc2 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, id, state, opts) { return new Vpc2(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Vpc2. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Vpc2.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["dateCreated"] = state ? state.dateCreated : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["ipBlock"] = state ? state.ipBlock : undefined; resourceInputs["ipType"] = state ? state.ipType : undefined; resourceInputs["prefixLength"] = state ? state.prefixLength : undefined; resourceInputs["region"] = state ? state.region : undefined; } else { const args = argsOrState; if ((!args || args.region === undefined) && !opts.urn) { throw new Error("Missing required property 'region'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["ipBlock"] = args ? args.ipBlock : undefined; resourceInputs["ipType"] = args ? args.ipType : undefined; resourceInputs["prefixLength"] = args ? args.prefixLength : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["dateCreated"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Vpc2.__pulumiType, name, resourceInputs, opts); } } exports.Vpc2 = Vpc2; /** @internal */ Vpc2.__pulumiType = 'vultr:index/vpc2:Vpc2'; //# sourceMappingURL=vpc2.js.map