@pulumi/digitalocean
Version:
A Pulumi package for creating and managing DigitalOcean cloud resources.
207 lines (206 loc) • 6.92 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a DigitalOcean Project resource.
*
* Projects allow you to organize your resources into groups that fit the way you work.
* You can group resources (like Droplets, Spaces, Load Balancers, domains, and Floating IPs)
* in ways that align with the applications you host on DigitalOcean.
*
* The following resource types can be associated with a project:
*
* * App Platform Apps
* * Database Clusters
* * Domains
* * Droplets
* * Floating IPs
* * Kubernetes Clusters
* * Load Balancers
* * Spaces Buckets
* * Volumes
*
* **Note:** A provider managed project cannot be set as a default project.
*
* ## Example Usage
*
* The following example demonstrates the creation of an empty project:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as digitalocean from "@pulumi/digitalocean";
*
* const playground = new digitalocean.Project("playground", {
* name: "playground",
* description: "A project to represent development resources.",
* purpose: "Web Application",
* environment: "Development",
* });
* ```
*
* The following example demonstrates the creation of a project with a Droplet resource:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as digitalocean from "@pulumi/digitalocean";
*
* const foobar = new digitalocean.Droplet("foobar", {
* name: "example",
* size: digitalocean.DropletSlug.DropletS1VCPU1GB,
* image: "ubuntu-22-04-x64",
* region: digitalocean.Region.NYC3,
* });
* const playground = new digitalocean.Project("playground", {
* name: "playground",
* description: "A project to represent development resources.",
* purpose: "Web Application",
* environment: "Development",
* resources: [foobar.dropletUrn],
* });
* ```
*
* ## Import
*
* Projects can be imported using the `id` returned from DigitalOcean, e.g.
*
* ```sh
* $ pulumi import digitalocean:index/project:Project myproject 245bcfd0-7f31-4ce6-a2bc-475a116cca97
* ```
*/
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;
/**
* the date and time when the project was created, (ISO8601)
*/
readonly createdAt: pulumi.Output<string>;
/**
* the description of the project
*/
readonly description: pulumi.Output<string | undefined>;
/**
* the environment of the project's resources. The possible values are: `Development`, `Staging`, `Production`)
*/
readonly environment: pulumi.Output<string | undefined>;
/**
* a boolean indicating whether or not the project is the default project. (Default: "false")
*/
readonly isDefault: pulumi.Output<boolean | undefined>;
/**
* The name of the Project
*/
readonly name: pulumi.Output<string>;
/**
* the id of the project owner.
*/
readonly ownerId: pulumi.Output<number>;
/**
* the unique universal identifier of the project owner.
*/
readonly ownerUuid: pulumi.Output<string>;
/**
* the purpose of the project, (Default: "Web Application")
*/
readonly purpose: pulumi.Output<string | undefined>;
/**
* a list of uniform resource names (URNs) for the resources associated with the project
*/
readonly resources: pulumi.Output<string[]>;
/**
* the date and time when the project was last updated, (ISO8601)
*/
readonly updatedAt: 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 {
/**
* the date and time when the project was created, (ISO8601)
*/
createdAt?: pulumi.Input<string>;
/**
* the description of the project
*/
description?: pulumi.Input<string>;
/**
* the environment of the project's resources. The possible values are: `Development`, `Staging`, `Production`)
*/
environment?: pulumi.Input<string>;
/**
* a boolean indicating whether or not the project is the default project. (Default: "false")
*/
isDefault?: pulumi.Input<boolean>;
/**
* The name of the Project
*/
name?: pulumi.Input<string>;
/**
* the id of the project owner.
*/
ownerId?: pulumi.Input<number>;
/**
* the unique universal identifier of the project owner.
*/
ownerUuid?: pulumi.Input<string>;
/**
* the purpose of the project, (Default: "Web Application")
*/
purpose?: pulumi.Input<string>;
/**
* a list of uniform resource names (URNs) for the resources associated with the project
*/
resources?: pulumi.Input<pulumi.Input<string>[]>;
/**
* the date and time when the project was last updated, (ISO8601)
*/
updatedAt?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Project resource.
*/
export interface ProjectArgs {
/**
* the description of the project
*/
description?: pulumi.Input<string>;
/**
* the environment of the project's resources. The possible values are: `Development`, `Staging`, `Production`)
*/
environment?: pulumi.Input<string>;
/**
* a boolean indicating whether or not the project is the default project. (Default: "false")
*/
isDefault?: pulumi.Input<boolean>;
/**
* The name of the Project
*/
name?: pulumi.Input<string>;
/**
* the purpose of the project, (Default: "Web Application")
*/
purpose?: pulumi.Input<string>;
/**
* a list of uniform resource names (URNs) for the resources associated with the project
*/
resources?: pulumi.Input<pulumi.Input<string>[]>;
}