Answers: <p>According to the <a href="https://www.digitalocean.com/community/tutorials/how-to-use-teams-on-digitalocean#team-resources" rel="nofollow noreferrer">article you linked</a>, Team Resources are shared. This means that all droplets (hosts) are shared across the team once you have a team in place.</p>
  
  <p><sup>source: <a href="https://www.digitalocean.com/community/tutorials/how-to-use-teams-on-digitalocean#team-resources" rel="nofollow noreferrer">https://www.digitalocean.com/community/tutorials/how-to-use-teams-on-digitalocean#team-resources</a></sup></p>
  
  <p>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 <code>tfstate</code> and managing secrets is addressed in this <a href="https://devops.stackexchange.com/questions/79/how-can-i-manage-secrets-in-tf-and-tfstate">DevOps.SE question</a>.</p>
  
Answers: CC BY-SA 4.0
Answers: 2017-03-01T02:19:16.450Z
Answers: 2019-04-23T01:08:52.900Z
Answers: 2019-04-23T01:08:52.900Z
Answers: Evgeny Zislis
Answers: <p>In <a href="https://www.digitalocean.com/docs/accounts/teams/resources/" rel="nofollow noreferrer">https://www.digitalocean.com/docs/accounts/teams/resources/</a> , it says &quot;The API does not support teams.&quot; and &quot;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.&quot;</p>
  <p>So I don't think you can do what you want to do, unfortunately. AFAIK, Terraform just uses the API.</p>
  
Answers: CC BY-SA 4.0
Answers: 2020-08-19T15:56:40.813Z
Answers: 2020-08-19T15:56:40.813Z
Answers: Richard Betel
Body: <p><a href="https://www.digitalocean.com/products/teams/" rel="noreferrer">Teams on Digital Ocean</a> are very recent and there is no documentation about using them with <a href="https://www.terraform.io/" rel="noreferrer">Terraform</a>.</p>
  
  <p>All information I can found is how to work with them <a href="https://www.digitalocean.com/community/tutorials/how-to-use-teams-on-digitalocean" rel="noreferrer">manually</a>.</p>
  
  <p>I was hoping that I could say something like:</p>
  
  <pre><code>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}"
  }
  </code></pre>
  
  <p>Note the <code>team = "${var.team}"</code> at the end.</p>
  
  <p>Since Terraform is just a wrapper on the top of the provider APIs I looked at the <a href="https://developers.digitalocean.com/documentation/v2/" rel="noreferrer">documentation</a> trying to find some endpoint of field about this but found nothing.</p>
  
  <p>How should I use Digital Ocean teams with Terraform? Or I am stuck with the <code>main</code> account if I want to automate things with Terraform?</p>
  
Comments: CC BY-SA 3.0
Comments: 2017-03-01T02:15:17.443Z
Comments: this would fit more as an issue in the terraform project on github
Comments: Evgeny Zislis
Tags: <terraform>
Title: How to create a host on a DigitalOcean team with Terraform?
UserDisplayName: Gepser Hoil
ThreadText: # How to create a host on a DigitalOcean team with Terraform?
  
  (Asked by: username_0 on 2017-02-28)
  
  [Teams on Digital Ocean](https://www.digitalocean.com/products/teams/) are very recent and there is no documentation about using them with [Terraform](https://www.terraform.io/).
  
  All information I can found is how to work with them [manually](https://www.digitalocean.com/community/tutorials/how-to-use-teams-on-digitalocean).
  
  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](https://developers.digitalocean.com/documentation/v2/) 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?
  
  **Tags:** terraform
  
  > **Comments:**
  > **username_1**: this would fit more as an issue in the terraform project on github  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-03-01. Score: 4
  
  According to the [article you linked](https://www.digitalocean.com/community/tutorials/how-to-use-teams-on-digitalocean#team-resources), 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](https://devops.stackexchange.com/questions/79/how-can-i-manage-secrets-in-tf-and-tfstate).
  
  
  ---
  
  ### Answer by username_2 on 2020-08-19. Score: 2
  
  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.
  
  
  ---
  
  