# CMDB (Global Inventory)

Source: https://docs.ops0.com/docs/iac/cmdb

A single, org-wide view of every cloud resource ops0 knows about — across every connected AWS, GCP, Azure, and Oracle Cloud account — regardless of which IaC project (if any) manages it.

**Not the same as Discovery or Resource Graph**

Discovery scans one cloud account at a time into a project. Resource Graph visualizes one Terraform state's dependency tree. CMDB is the rollup across all of them — every account, every project, unmanaged resources included — with live cost and drift layered on top.

## Why CMDB?

Most infrastructure inventories only show what's under IaC control. CMDB shows everything — including resources that exist in your cloud but were never defined in Terraform, OpenTofu, CloudFormation, or a generic IaC project (clickops changes, drift, or infrastructure nobody's imported yet).

## Finding CMDB in the UI

Click **CMDB** on the IaC Status board toolbar, next to Honeypots and Create Graph. It opens as a right-side drawer titled "CMDB — Global inventory across all connected clouds."

## Managed vs. Unmanaged

Every resource is classified as one of two states, matched by cloud ID or ARN against your projects' config files, deployed state, and resource graph:

| State | Meaning |
|-------|---------|
| **Managed** | Defined in one of your IaC projects (Terraform, OpenTofu, CloudFormation, or generic), whether or not it has been deployed yet |
| **Unmanaged** | Discovered in your cloud but not defined in any IaC project — a clickops change or drift |

## Stat Cards

The drawer's stat row reflects whatever filters are currently applied:

Total

Resource count for the current filter

Managed

Resources under IaC control

Unmanaged

Resources not defined in any IaC project

Accounts

Cloud accounts (integrations) contributing resources to the current view

Managed cost

Estimated monthly cost of resources deployed through ops0 projects

Cost

Live month-to-date cloud spend for the current filter

Drift

Resources whose live state has drifted from IaC-defined state

## Live Cross-Cloud Cost

CMDB pulls real, live month-to-date spend directly from each provider's billing API — not an estimate:

| Provider | Cost source | Status |
|----------|-------------|--------|
| **AWS** | Cost Explorer | Real, gross usage |
| **Azure** | Cost Management | Real, actual cost |
| **Oracle Cloud** | Usage API | Real, cost query |
| **GCP** | — | Unavailable — requires a BigQuery billing export to be configured |

A provider that fails to return cost data contributes an empty entry rather than breaking the view — the total is a sum of whatever's actually available.

## Filtering and Search

Filters derive their option list from the full resource set and default to fully selected — filtering one dimension never auto-narrows another. Available filters:

- **Search** — by name, ID, or tag
- **Provider** — AWS, GCP, Azure, Oracle
- **Account** — any connected cloud integration
- **Region**
- **Category / Type**
- **Managed / Unmanaged**
- **Tags** — key/value tag conditions

Search, filters, and the current page are mirrored into the URL, so a specific view can be shared with a link.

## Resource Detail

Clicking into a resource opens a detail panel with its tags, raw provider attributes, and relationships to other resources (inbound and outbound, with relationship type and strength).

## Refresh

### Standard refresh
Re-fetches the current inventory and cost data.

### Deep refresh
Runs a full live scan across all accounts plus inventory and cost re-aggregation. This is durable and resumable — if interrupted, it picks back up rather than restarting. A progress indicator shows the current phase and how many resources have been scanned.

## Exporting

Use **Export** in the drawer header to download the currently filtered result set:

| Format | Contents |
|--------|----------|
| **CSV** | Flat resource list — name, type, category, provider, account, region, managed status, estimated monthly cost, drift |
| **PDF** | Formatted report including the summary stats, active filters, and cost breakdown by account |

Both exports respect whatever search and filters are currently applied.

---

## Related

- [Resource Graph](https://docs.ops0.com/docs/resource-graph): Visualize dependencies and drift within a single Terraform state.

- [Discovery](https://docs.ops0.com/docs/discovery/overview): Scan a cloud account and generate IaC code from existing resources.

- [Drift Detection](https://docs.ops0.com/docs/discovery/drift-detection): Understand how ops0 detects and reports infrastructure drift.
