Tags, saved views & topology

Label resources, save views over the labels, and see how things connect.

What it is

Tags are key=value labels on resources. A saved view is a saved tag query: everything tagged product=shop, say, seen together with its networks and connections and counted for budgets. Where a resource lives is its project, which is not a tag. Find them under Tags & saved views, Topology and All resources in the console sidebar.

Concepts

Term Meaning
Tag A key and a value on one resource, such as env=prod. A resource has at most one value per key.
Tag policy The keys your organization has declared. A required key must be given when a resource is created.
Inherited tag A tag a resource took from what it was created under, such as an app's machine taking the app's tags. See Inheritance.
Saved view A named tag query (it was called a project until projects became where resources live). A resource is in every view whose query it matches; deleting a view deletes nothing else.
Topology Your private networks, with the apps, databases, caches and VPN gateway in each and which app uses which database or cache.
All resources Every resource the organization owns, across services, in one list.

Deleting a saved view archives it: it leaves the view list, the pickers and budgets, and its slug is free again, but the cost explorer keeps grouping what its resources cost under " (deleted)" instead of rewriting past cost to "no view". The grouping still follows the resources' current tags; retag a resource and its whole history moves with it.

How to

Tag a resource when you create it

In the console, the instance launch form has a Tags step. From the CLI or the API, add --tags key=value once per tag ("tags": { "key": "value" } in the body) to create on apps, instances, volumes, databases, caches, load balancers and container repositories:

dcloud deploy apps create --name shop --builder image --image-ref <image> --port 8080 \
  --tags product=shop --tags env=prod

Tag an existing resource

In the console, the tag editor sits on an app's Access page, an instance's page, a load balancer's page and the settings of a git or container repository. For any taggable resource:

dcloud tags tags set --resource-type rds:db --resource-id ewdb-… --key product --value shop
dcloud tags tags list --resource-type rds:db --resource-id ewdb-…
dcloud tags tags remove --resource-type rds:db --resource-id ewdb-… --key product

Setting a key that is already there replaces its value.

Require a tag

Tags & saved views → Tag policy → Declare a key, tick Required, or:

dcloud tags policy set-key --key team --required

Before the key becomes required, the console shows how many existing resources lack it, by service, and can set one value on all of them at once (Set on N). The same from the CLI:

dcloud tags tags coverage --key team
dcloud tags tags bulk --key team --value payments --resources '{"resourceType":"rds:db","resourceId":"ewdb-…"}'

From then on, every create form in the console lists the required keys first, marked Required, with the values already in use to pick from, and a missing one is in the form's To fix list before you submit. A create through the API, CLI, MCP or Terraform without the key is refused before anything is provisioned, with the keys, the values in use and how to pass them:

{
  "success": false,
  "code": "missing_required_tags",
  "error": "Missing required tags: team. Your organization requires them on every new database. Values in use (team: payments, search). Set them in the Tags field, or pass \"tags\": {\"team\": \"payments\"} in the request.",
  "missingTags": [{ "key": "team", "description": null, "valuesInUse": ["payments", "search"] }],
  "fix": { "api": "\"tags\": {\"team\":\"payments\"}", "cli": "--tags team=payments", "terraform": "tags = { team = \"payments\" }" }
}

Every create that makes a taggable resource takes tags (--tags key=value in the CLI, tags = {…} in Terraform). A resource created under another (a node group under its cluster, a restored database from its source, a snapshot from its volume) counts its parent's tags as given. Parts the platform creates for a managed service, such as a database's volumes and endpoint, take the service's tags and are never refused.

--backfill-from actor fills a missing key with the IAM user name of whoever creates the resource, so it never blocks. --no-required keeps the key declared but optional. dcloud tags policy delete-key --key team --yes forgets it; tags already set stay. A required key only stops creates: resources that exist without it keep running and can still be changed.

Save a view over tags

Tags & saved views → Create saved view, or (the API and CLI still call them projects under tags):

dcloud tags projects create --name Shop --query '{"key":"product","values":["shop"]}'

Each --query is one clause: a key and the values that satisfy it. A resource must match every clause, and any one value within a clause. --query '{"key":"product","values":["shop"]}' --query '{"key":"env","values":["prod","staging"]}' reads product=shop AND env in (prod, staging). Open on a project shows its resources on the topology map, at /projects/<slug>.

See how things connect

Topology shows each private network with its address range, its apps (with their domains and machines), its databases and caches, and its VPN gateway. Hover a card to see what it uses and what uses it. The same map, limited to a project's resources, is on the project's page. From the CLI:

dcloud tags topology get
dcloud tags topology get --project shop

List everything

All resources lists every resource across services, grouped by kind. Filter it by Running or stored, Configuration or Torn down, by type, by health, or by name and id. Degraded shows everything that is broken, in every service, with one press. Removal order sorts the groups in the order they have to be deleted to close down cleanly, with a line on each group saying what removing it involves.

Health

Every resource has one of six healths, the same words in every service. The map, each project and All resources use them; a card or row that is not healthy says why.

Health Meaning
Healthy running and doing its job
Progressing being created, changed or rolled out
Degraded failing, or running with something wrong
Suspended stopped or paused on purpose
Missing should exist and does not, or was never deployed
Unknown nothing to tell from, such as a machine that stopped reporting

Most resources take their health from their status. An app takes it from its newest deployment and its machines: a failed rollout or one machine whose app does not answer its health check makes it Degraded, a machine that stopped reporting makes it Unknown. A database that is available is Degraded while the platform's own health check has an open problem with it. A network, a project and the whole map take the worst health of what is in them, in this order from best to worst: Healthy, Suspended, Progressing, Missing, Degraded, Unknown. A machine's sync is shown beside its health and never changes it.

Reference

Keys and values

Item Rule
Key 1–64 characters, lowercase letters, digits, _, . and -, starting with a letter
Value 1–128 characters: letters, digits and _ . : @ / -, starting with a letter or digit; no spaces or =
Tags At most 50 per resource
Query 1–10 clauses per project, 1–50 values per clause

Taggable resources

--resource-type takes one of: ec2:instance, ec2:volume, ec2:elastic-ip, ec2:vpc, ec2:subnet, ec2:security-group, ec2:key-pair, ec2:image, rds:db, rds:snapshot, cache:cluster, lb:load-balancer, ecr:repository, npm:package, git:repository, kms:key, kms:ssh-key-pair, secrets:secret, deploy:app, deploy:deployment, deploy:domain, s3:bucket, ec2:snapshot, ec2:nat-gateway, efs:file-system, eks:cluster, eks:nodegroup, functions:function, queue:queue, dns:zone, vpn:endpoint, vpn:gateway, cdn:distribution, and the managed services' mysql:cluster, docdb:cluster, rabbitmq:broker, kafka:cluster. A node group, a queue and a function are tagged by their id (uuid), as a bucket is. --resource-id is the id the service gives the resource (a uuid, i-…, ewdb-…). A bucket is tagged by its id (the uuid on its page and in dcloud s3 buckets list), not its name; tags:TagResource is still checked on rn:ews::<org>:s3:bucket/<name>. A tagged bucket's storage counts towards its project and tag-scoped budgets.

Inheritance

A resource created under another takes the owner's tags for every key it was not given itself. This happens once, at creation: tagging the owner later does not reach resources that already exist, and a tag set directly on a resource always replaces an inherited one.

Resource Inherits from
App The git repository it is built from
An app's machines The app
The container repository an app creates The app
An app's database role and imported secrets The app
A database's volumes, endpoint load balancer, backup bucket and passwords The database (or Document Database cluster)
A cache's, MySQL cluster's or RabbitMQ broker's endpoint and passwords The cache, cluster or broker
A Kafka cluster's tiered-storage bucket and user passwords The cluster
A database's branch pool The database
Restored database or cluster The source
A Kubernetes node group The cluster
A node group's machines The node group
A Kubernetes cluster's volumes, load balancers and security groups The cluster
A site-to-site VPN gateway's connection secrets The gateway
Subnet, NAT gateway The VPC
Volume snapshot The volume
Machine image (by hand or a snapshot policy) The instance
Fork of a git repository The parent repository
Elastic IP Its instance

These are never refused by the tag policy: the policy is checked on what a person asks to create, and the parts the platform makes for it take its tags. Nothing else inherits; tag it yourself.

API

Operation Permission
GET /tags/api/resource, /tags/api/keys, /tags/api/values tags:ListTags (without it, /keys lists only the required keys)
GET /tags/api/coverage?key=… tags:ListTags
PUT /tags/api/resource tags:TagResource, on the tagged resource
POST /tags/api/bulk tags:TagResource, on each resource
DELETE /tags/api/resource tags:UntagResource, on the tagged resource
PUT, DELETE /tags/api/policy/keys tags:ManageTagPolicy
GET /tags/api/projects, /tags/api/projects/{id}/resources tags:ListProjects
POST /tags/api/projects, PATCH, DELETE /tags/api/projects/{id} tags:ManageProjects
GET /tags/api/topology none of its own: each service shows what you may describe
GET /tags/api/topology?project={slug} tags:ListProjects

tags:TagResource is checked on the resource's name (rn:ews:de1:<org>:rds:db/ewdb-…), so a policy can allow tagging some resources and not others. Budgets can be scoped to a project or to tag clauses; see Billing.

What is not supported

  • No OR across keys and no negation in a project query.
  • Tags do not propagate after creation, in either direction.
  • Caches, MySQL, Kafka and RabbitMQ have no tag editor in the console yet; tag them from the CLI or the API. Databases and buckets have one on their overview page.
  • A required key is not enforced on npm packages (the npm client cannot send tags), on sub-objects of a resource (a database's logins, a cluster's topics), on IAM objects, and not on resources that already exist.

Troubleshooting

Symptom Cause Fix
Missing required tags: … on create The tag policy requires those keys Fill them in the form's Tags field, or pass --tags key=value for each (the answer's fix says how)
Not a taggable resource type --resource-type is not in the list above (ec2:instances with an s, say) Use a type from Taggable resources
A project misses an app's machine The machine was created before the app was tagged Tag the machine too (--resource-type ec2:instance)
Keys are lowercase and start with a letter The key has a capital letter, a space or a leading digit Use env, not Env
Did this page help you?