UNPKG

@equinix-labs/pulumi-equinix

Version:

A Pulumi package for creating and managing equinix cloud resources.

111 lines 4.6 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Project = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an Equinix Metal project resource to allow you manage devices in your projects. * * > **NOTE:** Keep in mind that Equinix Metal invoicing is per project, so creating many `equinix.metal.Project` resources will affect the rendered invoice. If you want to keep your Equinix Metal bill simple and easy to review, please re-use your existing projects. * * ## Example Usage * ### example 1 * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as equinix from "@equinix-labs/pulumi-equinix"; * * const tfProject1 = new equinix.metal.Project("tfProject1", {name: "Terraform Fun"}); * ``` * ### example 2 * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as equinix from "@equinix-labs/pulumi-equinix"; * * const tfProject1 = new equinix.metal.Project("tfProject1", { * name: "tftest", * bgpConfig: { * deploymentType: "local", * md5: "C179c28c41a85b", * asn: 65000, * }, * }); * ``` * ### example 3 * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as equinix from "@equinix-labs/pulumi-equinix"; * * const existingProject = new equinix.metal.Project("existingProject", { * name: "The name of the project (if different, will rewrite)", * bgpConfig: { * deploymentType: "local", * md5: "C179c28c41a85b", * asn: 65000, * }, * }); * ``` * * ## Import * * This resource can be imported using an existing project ID: * * ```sh * $ pulumi import equinix:metal/project:Project equinix_metal_project {existing_project_id} * ``` */ class Project extends pulumi.CustomResource { /** * Get an existing Project 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 Project(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Project. 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'] === Project.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["backendTransfer"] = state ? state.backendTransfer : undefined; resourceInputs["bgpConfig"] = state ? state.bgpConfig : undefined; resourceInputs["created"] = state ? state.created : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["organizationId"] = state ? state.organizationId : undefined; resourceInputs["paymentMethodId"] = state ? state.paymentMethodId : undefined; resourceInputs["updated"] = state ? state.updated : undefined; } else { const args = argsOrState; resourceInputs["backendTransfer"] = args ? args.backendTransfer : undefined; resourceInputs["bgpConfig"] = args ? args.bgpConfig : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["organizationId"] = args ? args.organizationId : undefined; resourceInputs["paymentMethodId"] = args ? args.paymentMethodId : undefined; resourceInputs["created"] = undefined /*out*/; resourceInputs["updated"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Project.__pulumiType, name, resourceInputs, opts); } } exports.Project = Project; /** @internal */ Project.__pulumiType = 'equinix:metal/project:Project'; //# sourceMappingURL=project.js.map