Home/Library/OCI Compartments and Tagging
How-to · OCI · Updated May 2026

OCI Compartments and Tagging for Cost Allocation

Every dollar of Oracle Cloud spend should have an owner. OCI compartments and tagging are the two tools that make that happen. This guide shows how to structure compartments by ownership and enforce cost-tracking tags so your bill becomes a report you can act on.

OCI compartments and tagging for cost allocation work as a pair: compartments give you a structural boundary that maps spend to a team, environment, or project, and cost-tracking tags give you a flexible dimension that cuts across compartments for things like cost center, application, or business unit. Used together, they turn an undifferentiated bill into a breakdown where every line has an owner. Get this right and every later decision, from budgets to rightsizing, has someone accountable behind it.

This article is part of our Oracle cloud cluster. For the full set of levers, read the complete guide to Oracle Cloud (OCI) cost optimization, the pillar this guide links up to. Allocation is the foundation of the See step in our See, Cut, Lock, Run method: you cannot cut or govern spend you cannot attribute.

Compartments versus tags: which does what

Compartments are OCI's primary organizing structure. They are hierarchical, they carry access policies, and a resource lives in exactly one compartment. That makes them ideal for the coarse, durable boundaries of your organization: a compartment per team, per environment, or per major project. Cost-tracking tags are defined tags you flag as cost-tracking, and they attach a key-value label to resources regardless of compartment. They are ideal for the cross-cutting dimensions you also want to report on, like cost center or application, that do not line up neatly with the compartment tree.

Step 1: Structure compartments around ownership, not technology

The most common mistake is organizing compartments by service type, with one for compute and one for storage, which tells you nothing about who owns the spend. Structure compartments around the unit you hold accountable: a team, a product, or an environment. A typical pattern is a top-level compartment per business unit, then child compartments for production, non-production, and shared services. The goal is that looking at a compartment's cost answers the question who should care about this number.

Ownership is the test

If you can look at any compartment and immediately name the person or team responsible for its bill, your structure is right. If a compartment's cost belongs to no one in particular, it will be the compartment no one optimizes. Restructure until every branch has an owner.

Step 2: Define a small, enforced tag schema

Tags only help if they are applied consistently, so keep the schema small and mandatory. Three or four cost-tracking tags usually suffice: cost center, application or service, environment, and owner. Define them as a tag namespace so the keys are governed rather than free text, and mark the relevant ones as cost-tracking so they appear as dimensions in Cost Analysis. A sprawling, optional tag set produces low coverage and misleading reports; a lean, enforced set produces clean allocation.

Step 3: Enforce tags with defaults and policy

Manual tagging always decays, so enforce it. Use tag defaults on compartments so any resource created in a compartment inherits the right tags automatically, which closes most of the gap without relying on engineers to remember. Pair that with policy and review for the cases defaults cannot cover. Tag coverage is the metric to watch: the share of spend that carries a valid cost-tracking tag. Anything materially below full coverage means a slice of the bill is unattributed and therefore unmanaged.

Step 4: Report allocation in Cost Analysis

Once compartments and tags are in place, allocation reporting is a matter of grouping. Group spend by compartment for the structural view and by cost-tracking tag for the cross-cutting view, then reconcile any spend that lands in neither a meaningful compartment nor a tag. The sibling guide on how to read and use OCI Cost Analysis covers driving those views. The unattributed remainder is your tagging backlog.

Want every OCI dollar attributed to an owner?

We design your compartment and tag model, enforce it with defaults and policy, and lift coverage so your bill becomes a clean allocation report. On the performance model, you pay only from realized savings. No savings, no fee.

Book an OCI cost audit →

Step 5: Use allocation to drive budgets and accountability

Allocation is not the goal; acting on it is. Once compartments map to owners, set a budget per compartment so each owner gets alerted on their own spend, and bring the allocation breakdown to a monthly review where owners explain movement. The sibling guide on OCI budgets and cost alerts covers wiring budgets onto the structure you just built, which is where allocation turns into behavior change.

ToolBest for
CompartmentsDurable boundaries: team, environment, project, with access policy
Cost-tracking tagsCross-cutting dimensions: cost center, application, owner
Tag defaultsAutomatic tagging so coverage does not decay
BudgetsTurning an owned compartment into an alert and a conversation

OCI compartment behavior, defined tags, tag defaults and cost-tracking tag mechanics reflect the console as of May 2026. Confirm current tagging limits and behavior in Oracle's documentation before relying on them, as features evolve.

Go deeper · free guide

The OCI Cost Optimization Field Guide includes our reference compartment structure and starter tag namespace, so you can stand up a clean allocation model without designing it from scratch.

The short version

Structure OCI compartments around ownership, define a small enforced cost-tracking tag schema, use tag defaults and policy to keep coverage high, report allocation by grouping in Cost Analysis, and wire budgets onto the result so owners act. That is allocation that drives behavior. When you want your OCI compartment and tagging model designed and enforced by an independent team, that is part of what our OCI cost optimization service delivers.

The Cloud Cost Brief

Cloud pricing moves. We tell you when it matters.

New commitment instruments, FOCUS changes, hyperscaler pricing shifts, and the plays that actually move a bill. No schedule, no filler.

Subscribe · Work email only