Targeting Resources with Tag Groups

About Tag Groups

A Tag Group is a targeting mechanism, used to describe a collection of resources within a cloud environment. Tag Groups allow customers to define a combination of resource tag key:value pairs and a matching option for each and then combine them using a boolean expression to target any resources for which the given Tag Group validates.

Tag Groups can be re-used between different Rule Actions that target different resource types.

To avoid side-effects, once in use, Tag Groups cannot be modified, however, they can be cloned and then their references can be updated.

Creating a Tag Group

Tag Groups can either be created from within the form to create a new Rule, or alternatively by clicking your Team name in the nav bar, and selecting "Tag Groups".

Tag Groups Nav

While creating a Tag Group, if you make changes to the tags on your AWS Resources, you can tell GorillaStack to fetch the most recent tag data from AWS, by clicking the "Fetch Resource Tag Data" button in the top right hand corner of the view

Fetch Resource Tag Data

For each tag, we can match the tag key and value between GorillaStack and AWS either:

  • case sensitively
  • case insensitively
  • using regular expressions

Tag Groups Match Options

We then specify a boolean expression, which tells us how to combine how the defined tags are present and/or/not absent on the matching resources.

In this case, we are looking for resources:

  • an "environment" tag key with a value of "development", matching both key and value in a case insensitive fashion
  • and no tag key matching "schedule" in a case insensitive fashion, with a value that looks like 24x7, 24X7, 24/7 or 247

Tag Groups Targeting Expression

We can then click on a particular resource type (for example 'EC2 Instances') to see the matching resources in our environment. If within a Rule, this will only be the selected Accounts and Regions from the Rule Context.

Tag Group Selected

Finally, name your Tag Group and Save.

Next, we create our first rule