Skip to main content

How to Make Tags Show Up in Cost Data on AWS, GCP and Azure

Putting a tag on a resource is step one. Each cloud has a second step before that tag can split a bill, and they are all different.

A tag that exists on a resource but not in billing data is invisible to anyone slicing cost. AWS needs the tag key activated, Google Cloud carries labels into its billing export but you have to query them, and Azure only copies resource group and subscription tags down to usage if you ask it to. Here is the second step on each.

AWS: activate cost allocation tags

Only the management account of an organization (or a standalone account) can manage cost allocation tags.

  1. Find candidate keys. Newly applied tags can take up to 24 hours to appear.
Terminal window
aws ce list-cost-allocation-tags --status Inactive --type UserDefined
  1. Activate the keys you want in cost data, up to 20 per call:
Terminal window
aws ce update-cost-allocation-tags-status --cost-allocation-tags-status \
TagKey=team,Status=Active TagKey=environment,Status=Active

Activation itself can take up to another 24 hours. The console equivalent is Billing and Cost Management › Cost allocation tags › Activate.

  1. Backfill, because activation is otherwise forward-looking. A management account can backfill activation status for up to twelve months, once every 24 hours; the start must be the first day of a month:
Terminal window
aws ce start-cost-allocation-tag-backfill --backfill-from 2025-10-01T00:00:00Z

Backfill cannot invent history: months before the tag was on the resource still have no value for it.

  1. Verify with aws ce list-cost-allocation-tags --status Active, then group by the tag in Cost Explorer.

Google Cloud: query labels in the billing export

Resource labels flow into the Cloud Billing export to BigQuery as a repeated labels field. Labels must be lowercase letters, digits, underscores and dashes, keys start with a letter, and each resource can hold up to 64. To add one to a VM:

Terminal window
gcloud compute instances add-labels web-1 --zone=us-central1-a --labels=team=checkout

To split cost by a key without silently dropping unlabeled spend, join on the key rather than filtering with WHERE, as Google’s own example does:

Terminal window
SELECT labels.value AS team, SUM(cost) AS cost
FROM `billing-project.billing_dataset.gcp_billing_export_v1_XXXXXX_XXXXXX_XXXXXX`
LEFT JOIN UNNEST(labels) AS labels ON labels.key = "team"
GROUP BY team;

The null row is your untagged spend. Do not sum rows across different keys: Google warns that combining key/value groupings double counts.

Azure: enable tag inheritance

Azure resources carry their own tags into usage, but tags set on a resource group or subscription do not reach the resources’ usage records unless tag inheritance is on. It is available for EA, MCA and MPA (Azure plan) billing accounts and needs Cost Management Contributor to change on a subscription.

  1. Open Cost Management (not Cost Management + Billing) and select the scope.
  2. Under Settings, select Configuration, then Tag inheritance › Edit.
  3. Select Automatically apply subscription and resource group tags to new data.

Inherited tags are written onto usage records, not the resources. To tag a resource group itself:

Terminal window
az tag update --resource-id /subscriptions/SUB_ID/resourceGroups/checkout-rg \
--operation Merge --tags team=checkout

Check the result the same way everywhere

Pick one tag key, one month, and compare the untagged share before and after. If it does not drop, the tag is not on the resources that bill (volumes, snapshots and load balancers are frequent gaps). Naming the keys consistently is covered in tagging strategy.

Tag attribution in ZopNight

ZopNight reads AWS tags, GCP labels and Azure tags directly from the resources, plus accepted smart tags, and attributes cost on the Reports page’s Tags tab. Each key and value pair receives the full cost of every resource that carries it (there is no splitting), each row shows whether the tag came from the cloud or a smart tag, and the dashboard’s Tag Coverage widget shows tagged against untagged spend. Filling gaps without retagging by hand is covered in smart tags policies.

Stop watching the waste.
Start cutting it.

See. Find. Fix. Automatic.

Connect your first cloud account in under 5 minutes. See your first remediation in under 7. No credit card required.

CDCR connect detect classify remediate
full audit every action traceable
read-only default access
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·