Skip to main content
Version: 2.4.1

Configure DigitalOcean Access

The DigitalOcean collector is configured within the Resoto Worker configuration via the config command in Resoto Shell:

> config edit resoto.worker

Add digitalocean to the list of collectors by modifying the configuration as follows:

resotoworker:
...
# List of collectors to run
collector:
- 'digitalocean'
...
...

Authentication

DigitalOcean uses access tokens to authenticate API requests. You can provide access tokens to Resoto via configuration or environment.

Configuration

  1. Open the Resoto Worker configuration via the config command in Resoto Shell:

    > config edit resoto.worker
  2. Modify the digitalocean section of the configuration as follows, adding your API tokens and/or access keys:

    digitalocean:
    # DigitalOcean API tokens for the teams to be collected
    api_tokens:
    - 'dop_v1_e5c759260e6a43f003f3b53e2cfec79cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
    # DigitalOcean Spaces access keys for the teams to be collected, separated by colons
    spaces_access_keys: []
    ...

Environment

Instead of specifying API tokens or secret access keys in the Resoto Worker configuration directly, it is possible to define them using the --override flag or RESOTOWORKER_OVERRIDE environment variable.

  1. Set the RESOTOWORKER_OVERRIDE environment variable:

    • Add a environment variable definition to the resotoworker service in docker-compose.yaml:

      docker-compose.yaml
      services:
      ...
      resotoworker:
      environment:
      - RESOTOWORKER_OVERRIDE="digitalocean.api_tokens=dop_v1_e5c759260e6a43f003f3b53e2cfec79cxxxxxxxxxxxxxxxxxxxxxxxx"
      ...
      ...
    • Recreate the resotoworker container with the updated service definition:

      $ docker compose up -d

Resource Collection

By default, Resoto performs resource collection each hour. To immediately trigger a collect run, use the workflow run command in Resoto Shell:

> workflow run collect

Once the collect run completes, you can view a summary of collected DigitalOcean resources using the following search:

> search is(digitalocean_resource) | count kind