@pulumi/digitalocean
Version:
A Pulumi package for creating and managing DigitalOcean cloud resources.
104 lines (103 loc) • 3.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Assign resources to a DigitalOcean Project. This is useful if you need to assign resources
* managed via this provider to a DigitalOcean Project managed outside of the provider.
*
* 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
*
* ## Example Usage
*
* The following example assigns a droplet to a Project managed outside of the provider:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as digitalocean from "@pulumi/digitalocean";
*
* const playground = digitalocean.getProject({
* name: "playground",
* });
* const foobar = new digitalocean.Droplet("foobar", {
* name: "example",
* size: digitalocean.DropletSlug.DropletS1VCPU1GB,
* image: "ubuntu-22-04-x64",
* region: digitalocean.Region.NYC3,
* });
* const barfoo = new digitalocean.ProjectResources("barfoo", {
* project: playground.then(playground => playground.id),
* resources: [foobar.dropletUrn],
* });
* ```
*
* ## Import
*
* Importing this resource is not supported.
*/
export declare class ProjectResources extends pulumi.CustomResource {
/**
* Get an existing ProjectResources 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?: ProjectResourcesState, opts?: pulumi.CustomResourceOptions): ProjectResources;
/**
* Returns true if the given object is an instance of ProjectResources. 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 ProjectResources;
/**
* the ID of the project
*/
readonly project: pulumi.Output<string>;
/**
* a list of uniform resource names (URNs) for the resources associated with the project
*/
readonly resources: pulumi.Output<string[]>;
/**
* Create a ProjectResources 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: ProjectResourcesArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ProjectResources resources.
*/
export interface ProjectResourcesState {
/**
* the ID of the project
*/
project?: pulumi.Input<string>;
/**
* a list of uniform resource names (URNs) for the resources associated with the project
*/
resources?: pulumi.Input<pulumi.Input<string>[]>;
}
/**
* The set of arguments for constructing a ProjectResources resource.
*/
export interface ProjectResourcesArgs {
/**
* the ID of the project
*/
project: pulumi.Input<string>;
/**
* a list of uniform resource names (URNs) for the resources associated with the project
*/
resources: pulumi.Input<pulumi.Input<string>[]>;
}