Tags

Tags are a form of metadata that can be applied to specific entities in StrongDM. Each Tag is a key and optional value pair.

StrongDM entities that support Tags:

Tag Details

  • Maximum key length: 128 UTF-8 characters

  • Maximum value length: 256 UTF-8 characters

  • Maximum 50 tags per entity

  • Allowed characters: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @

  • Case-sensitive: team=StrongDM is different from team=strongdm

  • An entity can only have one value of a key at a time (If you have two tags env=prod and env=dev you can only assign one of them to a resource).

Tag Management

This article primarily focuses on Tag management through the CLI, but you can refer to the API docs for more info about managing tags via the API, and you can manually add and remove tags to and from resources in the Admin UI as well.

Reading Tags

When using list with the CLI, the right-most column will show current tags, if any, in a comma-separated list.

As in this example, you may need to add -e to show extended information, like Tags.

Creating Tags

You can add or update Tags with the flag --tags.

When adding multiple Tags, use a comma-separated list.

To add a Tag without a value, leave the value out of the command.

Updating Tags

In this example, we will use list to search for a specific User with a Filter, then run an update command to modify the loc Tag.

We will use the same --tags flag we used to add the Tag, but this time we will supply a new value to the loc key.

Now we see the Tag with the new value.

Deleting Tags

Let's start with a User that has 3 tags.

To remove a single Tag we will supply the --delete-tags flag, passing in the key of the Tag we wish to remove.

To remove multiple Tags we will add the keys additional keys in a comma-separated format. Any keys that do not exist will simply be ignored.

Lastly, to delete all Tags at once use the flag --delete-all-tags.

Chaining Commands

You can also combine these operations. For example, to delete all Tags and replace them with new tags:

Last updated

Was this helpful?