Assign resources to a DigitalOcean Project. This is useful if you need to assign resources managed in Terraform to a DigitalOcean Project managed outside of Terraform.
The following resource types can be associated with a project:
The following example assigns a droplet to a Project managed outside of Terraform:
data "digitalocean_project" "playground" {
name = "playground"
}
resource "digitalocean_droplet" "foobar" {
name = "example"
size = "s-1vcpu-1gb"
image = "ubuntu-22-04-x64"
region = "nyc3"
}
resource "digitalocean_project_resources" "barfoo" {
project = data.digitalocean_project.playground.id
resources = [
digitalocean_droplet.foobar.urn
]
}
The following arguments are supported:
project
- (Required) the ID of the projectresources
- (Required) a list of uniform resource names (URNs) for the resources associated with the projectNo additional attributes are exported.
Importing this resource is not supported.