@equinix-labs/pulumi-equinix
Version:
A Pulumi package for creating and managing equinix cloud resources.
171 lines (170 loc) • 7.24 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* 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}
* ```
*/
export declare 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: string, id: pulumi.Input<pulumi.ID>, state?: ProjectState, opts?: pulumi.CustomResourceOptions): Project;
/**
* 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: any): obj is Project;
/**
* Enable or disable [Backend Transfer](https://metal.equinix.com/developers/docs/networking/backend-transfer/), default is `false`.
*/
readonly backendTransfer: pulumi.Output<boolean>;
/**
* Optional BGP settings. Refer to [Equinix Metal guide for BGP](https://metal.equinix.com/developers/docs/networking/local-global-bgp/).
*
* > **NOTE:** Once you set the BGP config in a project, it can't be removed (due to a limitation in the Equinix Metal API). It can be updated.
*/
readonly bgpConfig: pulumi.Output<outputs.metal.ProjectBgpConfig | undefined>;
/**
* The timestamp for when the project was created.
*/
readonly created: pulumi.Output<string>;
/**
* The name of the project. The maximum length is 80 characters
*/
readonly name: pulumi.Output<string>;
/**
* The UUID of organization under which you want to create the project. If you leave it out, the project will be created under your the default organization of your account.
*/
readonly organizationId: pulumi.Output<string>;
/**
* The UUID of payment method for this project. The payment method and the project need to belong to the same organization (passed with `organizationId`, or default).
*/
readonly paymentMethodId: pulumi.Output<string>;
/**
* The timestamp for the last time the project was updated.
*/
readonly updated: pulumi.Output<string>;
/**
* Create a Project 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?: ProjectArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Project resources.
*/
export interface ProjectState {
/**
* Enable or disable [Backend Transfer](https://metal.equinix.com/developers/docs/networking/backend-transfer/), default is `false`.
*/
backendTransfer?: pulumi.Input<boolean>;
/**
* Optional BGP settings. Refer to [Equinix Metal guide for BGP](https://metal.equinix.com/developers/docs/networking/local-global-bgp/).
*
* > **NOTE:** Once you set the BGP config in a project, it can't be removed (due to a limitation in the Equinix Metal API). It can be updated.
*/
bgpConfig?: pulumi.Input<inputs.metal.ProjectBgpConfig>;
/**
* The timestamp for when the project was created.
*/
created?: pulumi.Input<string>;
/**
* The name of the project. The maximum length is 80 characters
*/
name?: pulumi.Input<string>;
/**
* The UUID of organization under which you want to create the project. If you leave it out, the project will be created under your the default organization of your account.
*/
organizationId?: pulumi.Input<string>;
/**
* The UUID of payment method for this project. The payment method and the project need to belong to the same organization (passed with `organizationId`, or default).
*/
paymentMethodId?: pulumi.Input<string>;
/**
* The timestamp for the last time the project was updated.
*/
updated?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Project resource.
*/
export interface ProjectArgs {
/**
* Enable or disable [Backend Transfer](https://metal.equinix.com/developers/docs/networking/backend-transfer/), default is `false`.
*/
backendTransfer?: pulumi.Input<boolean>;
/**
* Optional BGP settings. Refer to [Equinix Metal guide for BGP](https://metal.equinix.com/developers/docs/networking/local-global-bgp/).
*
* > **NOTE:** Once you set the BGP config in a project, it can't be removed (due to a limitation in the Equinix Metal API). It can be updated.
*/
bgpConfig?: pulumi.Input<inputs.metal.ProjectBgpConfig>;
/**
* The name of the project. The maximum length is 80 characters
*/
name?: pulumi.Input<string>;
/**
* The UUID of organization under which you want to create the project. If you leave it out, the project will be created under your the default organization of your account.
*/
organizationId?: pulumi.Input<string>;
/**
* The UUID of payment method for this project. The payment method and the project need to belong to the same organization (passed with `organizationId`, or default).
*/
paymentMethodId?: pulumi.Input<string>;
}