A cloud invoice tells you what you spent. It does not tell you who spent it. For an agency billing clients back, or a team splitting costs across products, the gap between those two statements is the difference between a profitable month and an argument. Tags close the gap. This guide sets out a tag schema that works across providers, shows how to enforce it and how to read the results, using DigitalOcean and Alibaba Cloud as examples.
What a tag is and what it is for
A tag is a key and value attached to a resource: a server, a volume, a database, a bucket. The provider stores the tag with the resource and lets you filter, group and report on it. Cost reports grouped by tag turn one undifferentiated invoice into a table of spend per client, per project or per environment.
Tags do not change what anything costs and do not enforce anything on their own. Their value is entirely in consistency: a tag applied to ninety percent of resources leaves ten percent of the bill unallocated, and that ten percent is usually where the surprises live. The first cloud invoice guide covers the untagged lines that most often escape.
A schema that survives contact with reality
Keep the schema small enough that people actually apply it. Five keys cover almost every allocation question:
| Key | Example value | Question it answers |
|---|---|---|
| client | acme | Who is billed back for this? |
| project | acme-storefront | Which deliverable does it belong to? |
| env | prod, staging, dev | Is this production or disposable? |
| owner | a team or person handle | Who do we ask before deleting it? |
| cost-center | an internal code | Where does finance book it? |
Use lowercase keys, a fixed set of allowed values for env, and one canonical spelling per client. Write the list down and treat additions as a change request rather than a free-for-all.
How the two platforms expose this
DigitalOcean organizes work in Teams, and within a Team you can group resources into Projects and attach tags to Droplets and other resources. A Team owns the resources and the billing, so an agency can choose between one Team per client with Projects inside, or one Team with a Project per client and tags for finer detail. The DigitalOcean teams and projects guide weighs those two layouts. Options on the Buy Digital Ocean Account page are described by Droplet count, and the tag schema applies to every Droplet regardless of that count.
Alibaba Cloud supports tags on Elastic Compute Service instances and most other resources, and its billing and cost-management tools can group spend by tag. Resources can also be organized into groups for access control, which complements tagging rather than replacing it. Accounts on the Buy Alibaba Cloud Account page are listed as “Alibaba Personal Account” options, and the same schema applies from the first ECS instance onward.
Enforcing tags instead of hoping
Tags applied by hand drift. Three measures keep them honest:
- Tag at creation, in code. If infrastructure is defined as code, put the five keys in a shared variable block so every resource inherits them. The guide to infrastructure as code for a new cloud account covers the pattern.
- Report the untagged. Each month, list resources missing any required key. A short list is a to-do; a long list is a process problem.
- Tie tags to lifecycle. Anything tagged env=dev with no owner response after a set period becomes a cleanup candidate.
Reading the bill by tag
With tags in place, the monthly routine is short. Group the invoice by client and reconcile the total against the invoice total; the difference is untagged spend to chase. Group by env to see how much of the bill is disposable environments. Group by owner to find resources whose owner has left. Group by project to spot a project whose spend has changed sharply month over month.
Some costs do not attach cleanly to a single resource, such as shared load balancers, pooled data transfer or support plans. Decide a rule for these once, for example splitting them in proportion to tagged compute, and apply it every month rather than renegotiating.
Tags across several accounts
Tags work within one account. If you run separate accounts per client, allocation is already done by the account boundary, and tags then serve project and environment reporting inside each. If you run one account for many clients, tags carry the whole allocation burden and the enforcement measures above become essential. The agencies guide to separating client environments compares those two structures, and managing multiple cloud accounts covers keeping the naming and tag schema identical across every account you hold.



