Skip to content


To provision resources with DigitalOcean you will need 2 types of credentials.

  • Spaces Token - used for setting up spaces buckets
  • API Token - used for setting up compute, databases and networking

API Token

To get the api token head over to the API section on the side bar.

api section

Click on the Generate New Token button.

api section

Give your token a name you can identify it with. Be sure to check the Write permission and click Generate Token. You can choose an expiration, but you need to make sure to replace the token once it expires.

api section

Once you create the token you will see it only once. Copy it and store it somewhere safe.

generated api token

Spaces Token

To get the spaces token, click on the Spaces Keys tab.

spaces keys

Click on the Generate new key button, give the key a name and click Create access key.

generated spaces token

Credential Management

In the Terraform configuration generated by our platform, the API token is referenced as do_token.

The spaces access key is referenced as do_access_key and do_secret_key.

Further Details

We have a video showing you how to store your credentials inside Terraform Cloud.