ProjectResources
Assign resources to a DigitalOcean Project. This is useful if you need to assign resources managed this provider to a DigitalOcean Project that is unmanaged by the provider.
The following resource types can be associated with a project:
- Database Clusters
- Domains
- Droplets
- Floating IP
- Load Balancers
- Spaces Bucket
- Volume
Example Usage
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
class MyStack : Stack
{
public MyStack()
{
var playground = Output.Create(DigitalOcean.GetProject.InvokeAsync(new DigitalOcean.GetProjectArgs
{
Name = "playground",
}));
var foobar = new DigitalOcean.Droplet("foobar", new DigitalOcean.DropletArgs
{
Size = "512mb",
Image = "centos-7-x64",
Region = "nyc3",
});
var barfoo = new DigitalOcean.ProjectResources("barfoo", new DigitalOcean.ProjectResourcesArgs
{
Project = data.Digitalocean_project.Foo.Id,
Resources =
{
foobar.DropletUrn,
},
});
}
}
Coming soon!
import pulumi
import pulumi_digitalocean as digitalocean
playground = digitalocean.get_project(name="playground")
foobar = digitalocean.Droplet("foobar",
size="512mb",
image="centos-7-x64",
region="nyc3")
barfoo = digitalocean.ProjectResources("barfoo",
project=data["digitalocean..Project"]["foo"]["id"],
resources=[foobar.droplet_urn])import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const playground = digitalocean.getProject({
name: "playground",
});
const foobar = new digitalocean.Droplet("foobar", {
size: "512mb",
image: "centos-7-x64",
region: "nyc3",
});
const barfoo = new digitalocean.ProjectResources("barfoo", {
project: data.digitalocean_project.foo.id,
resources: [foobar.dropletUrn],
});Create a ProjectResources Resource
new ProjectResources(name: string, args: ProjectResourcesArgs, opts?: CustomResourceOptions);def ProjectResources(resource_name, opts=None, project=None, resources=None, __props__=None);func NewProjectResources(ctx *Context, name string, args ProjectResourcesArgs, opts ...ResourceOption) (*ProjectResources, error)public ProjectResources(string name, ProjectResourcesArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ProjectResourcesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ProjectResourcesArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectResourcesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ProjectResources Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ProjectResources resource accepts the following input properties:
- Project string
the ID of the project
- Resources List<string>
a list of uniform resource names (URNs) for the resources associated with the project
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectResources resource produces the following output properties:
Look up an Existing ProjectResources Resource
Get an existing ProjectResources resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ProjectResourcesState, opts?: CustomResourceOptions): ProjectResourcesstatic get(resource_name, id, opts=None, project=None, resources=None, __props__=None);func GetProjectResources(ctx *Context, name string, id IDInput, state *ProjectResourcesState, opts ...ResourceOption) (*ProjectResources, error)public static ProjectResources Get(string name, Input<string> id, ProjectResourcesState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Project string
the ID of the project
- Resources List<string>
a list of uniform resource names (URNs) for the resources associated with the project
Package Details
- Repository
- https://github.com/pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.