# Add context to your cloud multi-account reports

> Custom names and tags make benchmark results easier to read, filter, and organize.

By Steampipe Team
Published: 2023-03-24


When you run a mod like [AWS Thrifty](https://hub.steampipe.io/mods/turbot/aws_thrifty), which finds ways to trim your AWS costs, Steampipe runs a set of controls. Each control in turn wraps a SQL query that returns [at least three columns](https://steampipe.io/docs/reference/mod-resources/control#required-control-columns): *status*, *reason*, and *resource*.

These queries can also return extra columns, called [dimensions](https://steampipe.io/docs/reference/mod-resources/control#additional-control-columns--dimensions), that add context to benchmark reports. For mods associated with AWS, useful dimensions include *account_id* and *region*; these help you track down, for example, where you're running EC2 instances that could be upgraded to newer and less costly instance types. You could always add dimensions yourself, but that required you to rewrite the mod's queries. Now, for dimensions that apply to any query in a mod, you can define them in mod variables.

## Resource tags

You can now also add resource tags to your your reports, to help filter and group control outputs. Use them in cost-savings reports, for example, to segment  controls by application team or cost center. To enrich your reports with resource tags for Cost Center, Owner and Environment, you can pass these tag names to the Steampipe CLI command `steampipe check`.

```
steampipe check control.ec2_instance_older_generation --var='tag_dimensions=["Cost Center", "Owner", "Environment"]'
```

Or if running in Steampipe Cloud, you can adjust the mod settings there.

<div style={{"width":"66%", "marginTop":"2em", "marginBottom":"2em"}}>
  <img alt="Steampipe tag dimensions variable" src="/images/blog/2023-02-mod-common-dimensions/spc_tag_dimensions_variable.png" />
</div>

Either way, the tag values will now appear in the control ouput.

<div style={{"marginTop":"2em", "marginBottom":"2em"}}>
  <img alt="Steampipe tag dimensions output in Steampipe Cloud" src="/images/blog/2023-02-mod-common-dimensions/tag_dimensions.png" />
</div>

When you export your results to CSV, JSON or other supported [outputs](https://steampipe.io/docs/reference/cli/check#output-formats), the tags are included and you can use them to filter and group the data.

## Connection names

If you are [aggregating connections](https://steampipe.io/docs/managing/connections#using-aggregators) you might want to see the *connection_name* in addition to *acount_id* and *region*. These aliases can provide more context when managing multiple accounts, and help distinguish which account_id corresponds to which workload.

We can extend the prior CLI command like so.

```
steampipe check control.ec2_instance_older_generation --var='tag_dimensions=["Cost Center", "Owner", "Environment"]' --var='common_dimensions=["region","account_id","connection_name"]'
```

Or if in Steampipe Cloud, you can again adjust in the mod settings directly.

<div style={{"width":"66%", "marginTop":"2em", "marginBottom":"2em"}}>
  <img alt="Steampipe common dimensions variable" src="/images/blog/2023-02-mod-common-dimensions/spc_common_dimensions_variable.png" />
</div>

Here's a sample result.

<div style={{"marginTop":"2em", "marginBottom":"2em"}}>
  <img alt="Steampipe common dimensions output in Steampipe Cloud" src="/images/blog/2023-02-mod-common-dimensions/common_dimensions.png" />
</div>


## It's all about context

When you run cross-account and cross-region benchmarks, it's helpful to contextualize the results. The added dimensions discussed here are available not only for [AWS Thrifty](https://hub.steampipe.io/mods/turbot/aws_thrifty) but also for many of the other [mods](https://hub.steampipe.io/mods) as well. 

If you have questions about *common_dimensions* and *tag_dimensions*, or thoughts about other ways to contextualize control outputs, our [Slack community](https://steampipe.io/community/join) is the place to share them.
