DEV Community

Cover image for I built Goliat: an open-source, self-hosted Azure inventory and FinOps dashboard
Daniel J. Saldaña
Daniel J. Saldaña

Posted on Originally published at danieljsaldana.github.io

I built Goliat: an open-source, self-hosted Azure inventory and FinOps dashboard

If you manage more than a couple of Azure subscriptions, you know the drill: the portal is great for one resource at a time, but answering simple questions across everything gets painful. Which VMs are running where? Which resources have no Owner tag? What did we actually spend on AKS last month?

I wanted one place to answer those questions, running in my own tenant with read-only access. So I built Goliat Cloud Inventory and released it as open source under the MIT license.

What it does

  • Inventory: 73 views in 12 service groups: compute, containers, web and APIs, networking, storage, databases, security, integration, data and AI, observability, and tags. Each category has an overview with KPIs and charts. Every table supports subscription filters, search, column filters, grouping, sorting, pagination and export.
  • Global search (Ctrl+K / ⌘K) over resources, IDs, tags, subscriptions and views, with no extra cloud calls.
  • FinOps: actual and amortized costs from Azure Cost Management, with daily trends and breakdowns by service, subscription, resource group and resource. Missing data or permissions are shown explicitly, never as zero cost, and currencies are never mixed.
  • Administration: Function, PostgreSQL and Blob Storage health and metrics, the collector schedule, monitored tag keys, and a warning when the published inventory differs from the imported one.
  • Roles: sign-in with Microsoft Entra ID, plus an optional Members view to grant or revoke the Goliat admin role, with an audit trail.
  • Bilingual UI in English and Spanish.

How it works

Azure Function (timer / queue / authenticated HTTP)
        │  Resource Graph + ARM, managed identity (Reader)
        ▼
Blob Storage  ──  azure/latest.json (versioned contract, ETag)
        │  read-only identity
        ▼
Next.js backend  ──  normaliser → PostgreSQL snapshot (one transaction)
        │
        ▼
Dashboard (React, shadcn/ui, Recharts)
        │
        └──  FinOps → Azure Cost Management
Enter fullscreen mode Exit fullscreen mode

Collection and presentation are fully decoupled. They communicate through a single versioned JSON document in Blob Storage.

  1. An Azure Function (Flex Consumption) runs on a timer or on demand. It queries Azure Resource Graph, fills in the gaps from ARM, validates the whole document and publishes it with an ETag condition. If any query fails, nothing is published.
  2. The Next.js backend downloads the blob, validates the contract and imports all 73 views into PostgreSQL in a single transaction. A failed import keeps the previous snapshot, and the same ETag is never imported twice.
  3. The Refresh button asks the Function for a new generation with an Entra token, waits for it, imports it and reloads the UI. A PostgreSQL advisory lock allows only one manual refresh at a time across all users and replicas.

Security by design

This was the part I cared about most, since an inventory tool sees everything:

  • Managed identities everywhere. There are no secrets in the code, and credentials never reach the browser.
  • Least privilege. The collector only has Reader. The web gets blob read access, Cost Management Reader, and two small custom roles for metrics and Function management.
  • Configuration only. The collector never reads blob contents, database data, Key Vault secrets, account keys or connection strings.
  • Fail closed. If the auth configuration is invalid, access is blocked; Goliat never falls back to public mode. Roles are re-checked on the server on every request.
  • Careful logging. Request bodies, cookies, tokens, query strings and SQL are never logged.

Deploying it

Everything lives in one resource group, created with Bicep and a PowerShell wrapper:

.\goliat.ps1 init
.\goliat.ps1 plan
.\goliat.ps1 deploy -GrantReader -RunAfterDeploy
Enter fullscreen mode Exit fullscreen mode

By default this creates App Service F1, PostgreSQL Flexible Server B1ms, a Flex Consumption Function and a Storage account. To be clear: it isn't free, because PostgreSQL doesn't scale to zero. There are stop, start and destroy-plan commands to keep costs under control.

Prefer containers? The Dockerfile has runner, collector and migrator targets.

To try it locally with fake data, you only need Node.js and PostgreSQL:

npm ci
cp .env.example .env   # demo login + local PostgreSQL
npm run db:init
npm run db:seed        # 5 subscriptions, 214 fictional resources
npm run dev
Enter fullscreen mode Exit fullscreen mode

Stack

Next.js 16 · React · shadcn/ui · Tailwind CSS 4 · Recharts · Auth.js · PostgreSQL · Azure Functions (Node.js) · Bicep · PowerShell · Playwright · GitHub Actions

The project has unit tests, PostgreSQL integration tests and Playwright browser tests on desktop and mobile. They run on every push and need no cloud credentials.

Try it

You don't need an Azure account to look around. The interactive demo runs entirely in your browser with fictional data, including the inventory, FinOps, user management and admin views.

If you try it, I'd love to hear what you think. Feedback, issues and stars are all very welcome. ⭐

👉 https://github.com/danieljsaldana/goliat-cloud-inventory

Top comments (3)

Collapse
 
vlad_z_16b6320e21f32bee0d profile image
Vlad Z •

Self-hosted beats another subscription for most teams at this stage, the real risk with DIY FinOps tooling is usually maintenance drift once the person who built it moves to a different project

What does Goliat do for cost allocation across subscriptions, since that's usually the harder half once the inventory side is solved

Collapse
 
danieljsaldana profile image
Daniel J. Saldaña •

Thanks for the feedback. I agree that long-term maintenance is one of the main challenges of self-hosted tooling. The project includes documentation, infrastructure as code, and automated tests to make maintenance easier and help other people take it forward.

Currently, Goliat can query costs across multiple subscriptions and break them down by subscription, resource group, service, and resource. It does not yet include a project- or team-based cost allocation engine.

The existing foundation—Microsoft Entra ID authentication and its own database—provides a basis for introducing projects with members and owners, associated with resources through tags, including resources spread across multiple subscriptions.

That model could support project budgets, cost forecasting, and notifications to project owners, shared mailboxes, or distribution lists. Shared services would also need explicit allocation rules.

I’ll incorporate this feedback into the next version, starting with project-based cost allocation. Thanks for highlighting it—it’s a valuable direction for the product.

Collapse
 
vlad_z_16b6320e21f32bee0d profile image
Vlad Z •

Entra ID auth plus your own database is a solid foundation to build project-level allocation on top of, the harder part is usually shared services, since those rarely map cleanly to one project no matter how good the tagging discipline is

A simple percentage-split rule per shared resource would get you most of the way there without needing a full allocation engine on day one