digitalocean_project_resources
Generated on 16 Jun 2025
from Terraform version
v2.56.0
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:
- 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 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
]
}
Argument Reference
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 project
Attributes Reference
No additional attributes are exported.
Import
Importing this resource is not supported.