digitalocean_project

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:

Note: A Terraform managed project cannot be set as a default project.

Example Usage

The following example demonstrates the creation of an empty project:

resource "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:

resource "digitalocean_droplet" "foobar" {
  name   = "example"
  size   = "s-1vcpu-1gb"
  image  = "ubuntu-22-04-x64"
  region = "nyc3"
}

resource "digitalocean_project" "playground" {
  name        = "playground"
  description = "A project to represent development resources."
  purpose     = "Web Application"
  environment = "Development"
  resources   = [digitalocean_droplet.foobar.urn]
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

Projects can be imported using the id returned from DigitalOcean, e.g.

terraform import digitalocean_project.myproject 245bcfd0-7f31-4ce6-a2bc-475a116cca97