Version: cicd.4.0 
Cost Tags
Cost Tags let you attach standardized cost attribution metadata to resources for chargeback and reporting use cases.
Below is the sample resource definition file for Cost Tag:
{
"rCostTag": {
"Type": "CostTag",
"Properties": {
"TagName": "cicdtestingtagname",
"TagKey": "cicdtestingtagkey",
"TagValues": [
"tagvalue1"
],
"TagDescription": "Base cost tag for CICD QA testing"
}
}
}
Note: Deployment dependencies
CostTag has dependencies on Tag.
Dependent resources should not be deleted before the primary resource; attempting to do so may lead to failures or inconsistencies during the deletion process.
Referencing this Resource
Below are the common keys that can be used in the DependsOn function to retrieve details of this resource.
Supported Key
| Key | Description |
|---|---|
| TagKey | Returns the TagKey value of this resource |
For additional supported keys, refer to the API definition document for the respective resource type.
Example
The following example shows how to retrieve the cost tag key from a cost tag template and use it in another template:
{
"rDataPipeline": {
"Type": "DataPipeline",
"Properties": {
"DataPipelineName": "cicddatapipelinestest",
"CostTags": [
{
"TagKey": {
"!DependsOn": "rCostTag.TagKey"
},
"TagValue": "test",
}
]
}
}
}