Tag Compliance

Define required AWS tags, measure compliance, and fix missing tags with Quick Tag, batch apply or a CLI script.

Tag Compliance

Set the tags every AWS resource must have, see which resources are missing them, and fix the gaps.

Where in CostGlassCosts → Tag Compliance
PlanAll plans
Who can do thisEveryone can view. Owners and admins can change the policy and apply tags.
Time needed10 minutes to set up
In short
  • You define a list of required tag keys. CostGlass checks every discovered AWS resource against it.
  • Each resource is Compliant (has all required tags), Partial (has some) or Untagged (has none of them).
  • The compliance score is the share of resources that have all the required tags.
  • Owners and admins can tag from the page, but CostGlass connects read-only by default, so most of the time it gives you an AWS command to run and you confirm afterwards.
  • This page covers AWS resources only. For other clouds, see Tag Explorer and Virtual tagging.
Before you begin
  • An AWS account connected to CostGlass, with resources discovered (see Cloud Resources).
  • To change the policy or apply tags: the Owner or Admin role.
  • To tag from the page directly: a CostGlass connection whose role is allowed to tag resources. Otherwise you will use the command CostGlass generates.
Tag Compliance: the four KPI cards, the mandatory tags bar, and the resource table with missing tags.

How compliance is worked out

  1. CostGlass takes the AWS resources it has discovered for your organisation (and only the accounts you can access).
  2. For each resource it looks at your required tag keys. Matching ignores case, so owner satisfies a required Owner.
  3. A required tag counts as present only if it has a value that is not blank.
  4. The resource is Compliant if every required tag is present, Partial if at least one is present but not all, and Untagged if none are.

The results are kept for 15 minutes so the page loads fast. Click Refresh Audit to bypass that and run it again, for example right after you change tags.

Note
Compliance looks at tags on your discovered resources, not at billed cost. A resource that is tagged here but missing from your cost data (for example a tag not yet activated for billing) is a separate issue. See Tagging strategy.

Set your required tags (the policy)

The policy is the list of tag keys every resource must have. A new organisation starts with Environment, Owner, Project and CostCenter.

1
Open the policy
On the grey bar headed Mandatory FinOps Tags:, click Edit Policy. A dialog called Configure Tag Governance Policy opens.
2
Remove tags you do not want
Click the x on a tag pill to remove it from the list.
3
Add your own
Type a key into the box (the example shown is BusinessUnit, ManagedBy) and add it.
4
Save
Click Save Policy. The page re-checks every resource straight away.
Tip
Keep the list short. Every extra required tag lowers the score and raises the clean-up effort. Four or five is realistic.
Note
The policy also stores an enforcement level (the default is "warning"), but CostGlass does not block anything in your cloud. Compliance here is a report. To block untagged resources, use your cloud's own policy tools (see Tagging strategy).

How to read the page

The four cards

CardMeaning
Tag Compliance RateThe percentage of resources that are fully compliant, with "X of Y resources compliant" underneath. Green at 80% or more, amber from 40%, red below 40%.
Untagged ResourcesResources with none of the required tags.
Partially TaggedResources missing one or more mandatory keys.
Governance StandardsHow many keys are required, and their names.

Coverage per tag

Below the policy bar there is one small card per required tag, for example Tag: Owner with a percentage and a bar: the share of resources that have that tag. This tells you which tag is the hardest to get. Green is 80% or more, amber is above zero, red is zero.

The resource table

ColumnMeaning
ResourceName and type of the resource.
Account & RegionWhere it lives.
ComplianceCompliant, Partial or Untagged, and the score for that resource (present required tags out of all required).
Missing Required TagsThe keys it still needs. "None" means it has them all.
Existing TagsThe tags it already has.
ActionsA Quick Tag button to fix that one resource.

Filtering the list

FilterWhat it does
All / Untagged / Partial / CompliantStatus buttons. The counts are shown in brackets.
All Resource TypesLimit to one type, for example a database type.
Search resources, tags, IDs...Free text across names, tags and ids.
All AccountsLimit to one AWS account.
Hide EphemeralHides short-lived items such as auto-scaling instances, spot nodes and log groups, which usually are not worth tagging by hand. The number next to it says how many are hidden.

Results are paged; use the page size and the page buttons at the bottom of the table.

Fixing missing tags

Tag one resource: Quick Tag

1
Click Quick Tag
On the resource's row. A dialog opens with a box for each required tag.
2
Enter values
Type a value for each missing tag. For Environment there are quick presets (prod, dev, staging). You can add a custom key and value too.
3
Save
Click Save & Tag AWS Resource.

Tag many at once: Batch Apply Tags

Tick the boxes on the rows you want. A bar appears with the choices below. Click Batch Apply Tags, fill in the values, then Apply Tags to N Resources.

Button in the selection barWhat it does
Batch Apply TagsOpens a dialog to tag all the selected resources with the same values.
CLI for SelectedCreates an AWS command script for only the selected resources.
Quick Virtual RuleOpens Virtual tagging with a rule prefilled from the first selected resource's type, as a way to allocate them without tagging.
Deselect AllUnticks everything.
Select all N matching resourcesSelects every resource that matches your filters, not just the current page.

What happens when CostGlass cannot write to AWS

CostGlass connects to your AWS accounts read-only by default (apart from the optional Instance Scheduler). That is why most tag requests cannot be completed by CostGlass itself. When AWS refuses, or there is no role CostGlass may use for that account, nothing is marked as tagged, and you see an AWS Write Permission Notice with:

  • the exact AWS CLI command for that resource, with a Copy button;
  • Remediation Steps: run the command with credentials for the right AWS account and region, or give the CostGlass role tagging permission;
  • a green I Ran the CLI Command (Confirm Tagged) button.
Warning
Run the command with credentials for the AWS account named in the notice. A profile for a different account will tag the wrong thing or fail.

After you run the command in AWS, click I Ran the CLI Command (Confirm Tagged). That tells CostGlass the tags are now there, so the page updates. For a refreshed result straight from the cloud, use Refresh Audit.

Important
Applying and confirming tags are owner and admin actions. A member will get a permission error. Only resources that belong to your organisation can be tagged; the account and region always come from CostGlass's inventory.

The bulk tagging script

For a large clean-up, use Generate AWS CLI Script (top right) or Export AWS CLI Script (on the grey bar). CostGlass builds one shell script with a command per resource that is missing required tags, covering only the tags each resource is missing.

You supply the values

CostGlass cannot know what a tag value should be (which environment? whose cost centre?), so it does not invent them. Each value is a variable at the top of the script, named from the tag key: letters and digits are kept, everything else becomes an underscore, and it is upper-cased, with the prefix TAG_.

Top of a generated script (illustrative)
  • The script refuses to run while any variable is empty.
  • Values must not contain commas.
  • The same value goes on every resource that script touches. If different resources need different values (for example prod and dev), edit the commands or run the script in parts.
  • Commands are grouped under a heading naming the AWS account. Run each group with credentials for that account.
  • Resources with no known region, or with no account and no ARN, are skipped, and the script ends with a note of how many.

Run it

1
Copy the script
Use the Copy button in the dialog, or save it as a file.
2
Set the variables
For example export [email protected] and export TAG_ENVIRONMENT=prod in your terminal.
3
Sign in to the right AWS account
Use the credentials for the account named above each group of commands.
4
Run it
Run the script, then click Refresh Audit in CostGlass.

Running a tag clean-up campaign

A four-week plan (illustrative)
  1. Week 1, decide. Agree the required tags. Enter them in the policy. Note the starting score.
  2. Week 2, quick wins. Turn on Hide Ephemeral. Filter by Untagged and by a resource type. Use the bulk script for obvious cases.
  3. Week 3, owners. Share the filtered list by account with each team. They use Quick Tag or their own tooling.
  4. Week 4, lock it in. Add default tags in your infrastructure-as-code and a cloud policy so new resources start tagged. Check Tag Explorer coverage on the cost side.
Tip
Aim for a rising line, not perfection. Seventy to eighty per cent on the resources that carry most of the cost is a strong result.

Limits to know about

  • AWS only. Other clouds' resources are not in this audit.
  • Discovered resources only. A resource must be in CostGlass's inventory. Some types, such as ones with no ARN, may be skipped in the script.
  • Results are cached for 15 minutes unless you click Refresh Audit.
  • If you are limited to part of the organisation, you only see and fix resources in accounts you can access.

Frequently asked questions

Why can I not just click and have the tags applied?
CostGlass connects read-only by default, so AWS usually refuses the change. CostGlass then gives you the command to run, and you confirm when done.
I tagged a resource in AWS but it still shows as missing.
Click Refresh Audit. The result is cached for 15 minutes, and discovery has to see the new tag.
Does a blank tag value count?
No. A required tag with an empty value counts as missing.
Does tagging here affect my cost reports straight away?
Not necessarily. On AWS the tag must also be activated as a cost allocation tag, and only new charges carry it. See Tagging strategy.
Can a member change the policy?
No. Only owners and admins can edit the policy or apply tags.

Related guides