Site Loader
three assorted-color keys

Getting your DigitalOcean API key

Log onto your Digital ocean account.

Then click the Api menu near the bottom on the left.

DO Api Button

Then make sure you are on the Tokens/Keys tab and click the Generate New Token button.

DO Gen New Token Button

Clicking should bring up a box where you can give the token a name.

Leave the ‘Write’ checkbox ticked.

DO New Token Settings

Once again, save this token somewhere save.

I would also once again create a bash function to set it.

While we are at it will also add one for TF_VAR_do_token for Terraform.

Here is an example.

setDOLvDepProfile() {  
  export DIGITALOCEAN_TOKEN="MY_DO_TOKEN"
  export TF_VAR_do_token="${DIGITALOCEAN_TOKEN}"
}

Post Author: timhaak

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.