CLICommandsl4 tags

Overview

l4 tags reads your organization's tag keys, both the provider keys from your AWS and GCP bills and the virtual keys you defined. It also manages virtual keys from YAML files you keep in version control. Virtual tags explains how a virtual key picks a value for each cost.

l4 tags <command> [flags]

Subcommands

CommandPurposeScope
listEvery key, with its values, resources and spendread
showOne key: its rules in order, spend per value, unallocated spendread
coverageTagged share of spend and resources, with and without virtual tagsread
resourcesResources carrying a key, and the value each one holdsread
costsSpend per value of a keyread
previewDry run of a tag file. Stores nothingread
applyCreate or replace a virtual key from a tag fileread-write
deleteDelete a virtual keyread-write

Naming a key

show, resources, costs and delete take a <key> argument: a key ID or a key name. l4 tags list prints both. A vtk_ ID belongs to a virtual key and a ptk_ ID to a provider key. A virtual key can share its name with a provider key, and the ID then picks the one you mean.

Two commands narrow that. delete refuses a ptk_ ID, since a provider tag comes from the bill. costs takes a name or a vtk_ ID and reads a ptk_ ID as a literal tag key, which matches nothing.

When the argument is a name, the CLI resolves it against the key list before making the real request, so a name nobody holds fails locally with no tag key named ... rather than a 404 from the API.

Dates

--start and --end take YYYY-MM-DD and go together. Without them, a command reads the last 30 complete days. l4 tags costs is the exception, and reads the current month to date.

Global flags (--json, --jq, --template, --quiet) apply to every subcommand. See CLI overview.

Examples

l4 tags list --origin virtual
l4 tags show Teams
l4 tags coverage --provider aws
l4 tags preview -f teams.yaml
l4 tags apply -f teams.yaml --dry-run