Parallel icon
List icon
List icon
List icon
List icon
List icon
List icon
List icon
SlackIncomingWebhook icon
Schedule icon

Weekly DigitalOcean Account Inventory Report

Track DigitalOcean sprawl with Kestra. Count droplets, volumes, databases, load balancers, clusters, firewalls, and domains in parallel and post to Slack.

Categories
BusinessCloud

Know what your DigitalOcean account is running before the invoice tells you. This blueprint sweeps seven resource types in parallel, droplets, block storage volumes, managed database clusters, load balancers, Kubernetes clusters, firewalls, and DNS zones, and posts one Slack digest with every count. Each listing uses fetchType: NONE, which asks the API only for totals, so the report is fast, cheap, and safe to run against accounts of any size. A dedicated failure alert makes sure a broken token or revoked scope never silently stops the reporting.

How it works

  1. collect_inventory (io.kestra.plugin.core.flow.Parallel) fans out seven listing tasks concurrently instead of walking them one by one.
  2. Each child task is one of the plugin's List tasks, droplet.List, volume.List, database.List, loadbalancer.List, kubernetes.List, firewall.List, and domain.List, configured with fetchType: NONE so only the API's total count is returned, not the resources themselves.
  3. report (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) assembles the seven total outputs into one message.
  4. The errors block posts a distinct alert when any listing fails, typically an expired token or missing scope.
  5. A disabled-by-default Schedule trigger runs the sweep every Monday at 07:00.

What you get

  • A weekly, zero-maintenance census of the whole account in one Slack message.
  • Early sprawl detection: a droplet count that jumps from 12 to 19 gets questioned on Monday, not at month end.
  • A pattern that costs seven API calls total, regardless of account size.
  • A base to build real cost governance on: every count is a task output ready to be stored, compared, or graphed.

Who it's for

  • Engineering managers and platform leads who own the DigitalOcean bill.
  • Teams with several people holding create permissions and no single source of truth for what exists.
  • Agencies operating multiple client workloads who need a recurring per-account census.

Why orchestrate this with Kestra

The DigitalOcean console shows each resource type on its own page and offers no scheduled reporting at all. Getting one number per resource type every week means either clicking through seven pages or maintaining a cron script with an API client, retries, and Slack plumbing. Kestra replaces that with seven declarative tasks and a schedule: parallel execution comes from Parallel, secrets stay in the secret store, failures alert instead of vanishing, and the execution history becomes a time series of your account's footprint.

Prerequisites

  • A DigitalOcean personal access token with read scope for the listed resource types.
  • A Slack incoming webhook for the digest.

Secrets

  • DIGITALOCEAN_TOKEN: DigitalOcean personal access token.
  • SLACK_WEBHOOK_URL: Slack incoming webhook URL.

Quick start

  1. Add the two secrets above to your Kestra namespace.
  2. Execute the flow manually and check the digest arrives in Slack.
  3. Set disabled: false on the weekly trigger, adjusting the cron to your reporting rhythm.

How to extend

  • Switch selected listings to fetchType: STORE and feed the stored Ion files into DuckDB or a warehouse to track per-resource details over time, not just counts.
  • Add per-region breakdowns by fetching rows and grouping with a small Python task.
  • Compare this week's counts against last week's using Kestra KV storage and highlight the delta in the digest.
  • Extend the sweep with domain.record.List per zone for a DNS census, or alert when list_firewalls.total is zero while droplets exist.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.