Teams on Digital Ocean are very recent and there is no documentation about using them with Terraform.

All information I can found is how to work with them manually.

I was hoping that I could say something like:

resource "digitalocean_droplet" "host" {
    image = "${var.image}"
    name = "${var.host_name}"
    region = "${var.region}"
    size = "${var.size}"
    private_networking = "${var.private_networking}"
    ssh_keys = ["${var.ssh_fingerprint}"]
    team = "${var.team}"

Note the team = "${var.team}" at the end.

Since Terraform is just a wrapper on the top of the provider APIs I looked at the documentation trying to find some endpoint of field about this but found nothing.

How should I use Digital Ocean teams with Terraform? Or I am stuck with the main account if I want to automate things with Terraform?

  • this would fit more as an issue in the terraform project on github Mar 1, 2017 at 2:15

2 Answers 2


According to the article you linked, Team Resources are shared. This means that all droplets (hosts) are shared across the team once you have a team in place.

source: https://www.digitalocean.com/community/tutorials/how-to-use-teams-on-digitalocean#team-resources

This means that each team member, using his own personal token, can manage all the resources shared with her. Terraform allows each user to use his own credentials when managing resources, and includes a state file (that must be shared as well). Managing shared tfstate and managing secrets is addressed in this DevOps.SE question.


In https://www.digitalocean.com/docs/accounts/teams/resources/ , it says "The API does not support teams." and "doctl is a command-line interface for the DigitalOcean API and supports many of the same actions. Like the API, doctl does not support teams."

So I don't think you can do what you want to do, unfortunately. AFAIK, Terraform just uses the API.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.