Use tags for cost allocation of instance-based services

Updated at:

Instance-based services such as ECS, SLB, and EIP are billed at the instance level. Tags let you allocate costs for these services to specific departments or projects.

Step 1: Create and add a tag

In this example, create and add the Project:Game tag to ECS instances in the Tag console to identify resources that belong to the game project.

  1. Log on to the Tag console.

  2. In the left-side navigation pane, choose Tag > Tag, and then click Create Tag.

  3. In the Create Tag dialog box, enter a tag key (for example, Project) and a tag value (for example, Game), and then click Create.

  4. In the tag list, find the tag and click Add to Resources in the Actions column. Select the desired ECS instances and click Add.

  5. In the ECS console, verify that the tag is added to the ECS instances.

    In the instance list, the Project:Game tag appears in the Tag column, confirming that the tag was added.

Step 2: Enable a cost allocation tag

Enable a tag as a cost allocation tag so that it appears on billing pages and in cost centers. This example uses the tag key Project.

  1. Go to the Cost Allocation Tags page in Expenses and Costs. If you have not activated this feature, follow the on-screen instructions to activate it.

  2. On the Cost Allocation Tag page, select the tag and enable it.

    Important

    A new tag appears on the cost allocation tag list one day after it is created.

Step 3: Create an automatic allocation rule

On the Cost Center page in Expenses and Costs, create an automatic rule to allocate resources to cost centers based on tags.

  1. Go to the Cost Center page in Expenses and Costs. If you have not activated the cost center feature, follow the on-screen instructions to activate it.

  2. On the Cost Center page, click + in the cost center tree on the left to create a cost center.

  3. If no rules exist in the cost center, click Create Rule. Otherwise, click Edit to modify an existing rule.

  4. Configure an automatic rule to allocate resources to the cost center based on tags.

    • Condition: Select Tag.

    • Tag key: In this example, select Project.

    • Tag value: In this example, select Game.

    For more information, see Set global rules.

  5. View the automatically allocated resources.

    Important

    Automatically allocated resources appear in the cost center one day after the rule is created.