Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 2. Using tags to manage cost data

download PDF

Learn how tags work in cost management and how you can use them to best organize and view your resources to manage your costs.

2.1. Enabling and creating a tag mapping

Tag mapping is when you combine multiple tags across your cloud integrations. Tag mapping enables you to group and filter similar tags with one tag key.

To map a tag, you must first enable it. Cost management has a limit of 200 tags that you can enable. Complete the following steps:

  1. In cost management, click Settings.
  2. Click the header tab, Tags and labels.
  3. Click the drop-down menu, Enable tags and labels.
  4. Select the tags that you want to enable. Clear a tag to disable it.
  5. Next, click the Map tags and labels drop-down menu and click Create a tag mapping.
  6. In the wizard that opens, select the tags that you want to make child tags. Then click Next.
  7. Select one tag that you want to be the parent tag. This action will map the parent tag to the children tags that you selected in the previous step. Click Next.
  8. Review your selections and click Create tag mapping.

2.1.1. Troubleshooting duplicate keys

For every resource, each tag key must be unique and have only one value. However, when you map tags, you can unintentionally create scenarios that violate this rule and create multiple values.

Ordinarily, having more than one value would duplicate your costs. However, to avoid duplication, cost management prioritizes one key’s value. To understand how cost management prioritizes values and plan accordingly, see Section 1.3, “Understanding value precedence in tags”.

2.1.1.1. Troubleshooting example

Consider the following example where you are running an EC2 instance on AWS. You tagged this instance with the following key > value pairs:

  • app > cost-management
  • App > Insights

In cost management, you mapped app to App. Therefore, the same EC2 instance has the following key > value pairs:

  • App > cost-management
  • App > Insights

In this situation, cost management prioritizes the pre-existing value of the key App > Insights. Cost management also removes the association of the key app and its value cost-management from the AWS resource to prevent duplicate costs. App=cost-management is added to the App=insight cost.

Because App is set as the parent key, cost management prioritizes its value over the value of app in the tag mapping. Therefore, you should consider your tag mapping strategy before you set parent tags.

To troubleshoot issues with duplicate keys, ensure that your tag keys are unique and have only one value. Alternatively, to learn how to prioritize your keys, see Section 1.3, “Understanding value precedence in tags”.

Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.