CostFormation Language Reference

Conditions

This sections lists the supported conditions.

And

This condition evaluates a list of conditions as a logical And operation.

  - And:
    - <Condition 1>
    - <Condition 2>
    ...
    - <Condition N>

This condition evaluates to True only if all conditions evaluate to True. If a single condition in the list evaluates to False, then the entire condition evaluates to False.

BeginsWith

This condition checks whether the source value begins with the any of the specified strings. This condition can optionally specify its own source properties.

  - BeginsWith: <Value>
    <Source Properties>

Or

  - BeginsWith:
      - <Value 1>
      - <Value 2>
      ...
      - <Value N>
    <Source Properties>

Contains

This condition checks whether the source value contains any of the specified strings. This condition can optionally specify its own source properties.

  - Contains: <Value>
    <Source Properties>

Or

  - Contains:
      - <Value 1>
      - <Value 2>
      ...
      - <Value N>
    <Source Properties>

Equals

This condition checks whether the source value equals any of the specified strings. This condition can optionally specify its own source properties.

  - Equals: <Value>
    <Source Properties>

Or

  - Equals:
      - <Value 1>
      - <Value 2>
      ...
      - <Value N>
    <Source Properties>

HasValue

This condition checks whether the source value has an actual value or not. This condition can optionally specify its own source properties.

  - HasValue: <True|False>
    <Source Properties>

If HasValue is set to True, then the condition evaluates to True if the source has a value. If HasValue is False, then the condition evaluates to False if the source does not have a value.

Not

This condition evaluates the list of conditions as a logical Or and then negates the result.

  - Not:
    - <Condition 1>
    - <Condition 2>
    ...
    - <Condition N>

This condition evaluates to True only if all conditions evaluate to False. If a single condition in the list evaluates to True, then the entire condition evaluates to False.

Or

This condition evaluates the list of conditions as a logical Or.

  - Or:
    - <Condition 1>
    - <Condition 2>
    ...
    - <Condition N>

This condition evaluates to True if any of the list of conditions evaluate to True. If all conditions in the list evaluate to False, then the entire condition evaluates to False.

Sources

This section describe the available sources that can be referenced when building Custom Dimensions with CostFormation. The sources are broken down by types of sources (i.e. sources direct from billing data, resource tags, etc). Each table shows the Source ID which is the ID of the source that would be used in the Custom Dimension definition.

📘

Dimensions in the Explorer and Views

Not all source dimensions listed in this section are available in the Explorer or Views and some are located with a slightly different name than their ID. Check the Name in Explorer/Views column to see which source IDs are visible in the Explorer and Views and under which name.

Core Cloud Provider Dimensions

These dimensions are derived directly from billing data from your cloud provider.

Source IDName in Explorer/ViewsDescription
AccountAccountElements consist of the account IDs for any cloud account you have connected to CloudZero.
CloudProviderCloud ProviderElements consist of the cloud providers supported by CloudZero (i.e. AWS and Snowflake)
InvoiceIdNot AvailableElements consist of the corresponding invoice id of the charges.
LineItemTypeNot AvailableElements consist of the type of charge for a given billing line item.
OperationNot AvailableElements consist of the specific cloud provider operation covered by the billing line item.
PayerAccountNot AvailableElements consist of the Management Account associated with the charges
PricingTermNot AvailableElements consist of how charges are priced (i.e. on-demand, reserved, etc.)
RegionRegionElements consist of the cloud region where the billed resource is located.
ResourceResourceElements consist of the resource identifier, such as the AWS resource ARN, Snowflake Name, or CloudZero CZRN.
RequestTypeNot AvailableElements consist of incoming request type, such as from CloudFront for example
ServiceServiceElements consist of the cloud provider service type, such as an AWS service or Snowflake service
TransferTypeNot AvailableElements consist of the type of data transfer, outbound, intra-region, etc.
UsageFamilyUsage FamilyElements consist of the cloud service charges.
UsageTypeNot AvailableElements consist of the usage details of the billing line item in AWS or equivalent in Snowflake account usage

Tag Dimensions

The CloudZero platform inspects all of your cloud resources and compiles the list of tags, both AWS tags and user tags, and exposes them as Dimensions that can be used throughout the platform. All tags are available in the Explorer and Views.

Source IDName in Explorer/Views (Found under Cloud Dimensions)Description
Tag:Tag -> <Tag Name>Elements consist of the different values for the given tag.

Kubernetes Dimensions

Some dimensions are derived from dynamic data that is discovered through integration with Kubernetes. All Kubernetes dimensions are available in the Explorer and Views.

Source IDName in Explorer/Views (Found under Kubernetes)Description
K8s:ClusterClusterElements consist of the Kubernetes cluster names
K8s:NamespaceNamespaceElements consist of the Kubernetes namespace across all Kubernetes clusters
K8s:Label:<Label Name>Label -> <Label Name>Elements consist of the Kubernetes labels exposed from any Kubernetes configurations for resources such as pods or policies, etc.
K8s:WorkloadWorkloadElements consist of the deployed workload resources in any of your Kubernetes clusters
K8s:PodN/AElements consist of the deployed pods in any of your Kubernetes clusters. This dimension is deprecated, and is hidden from the Explorer view. Use K8s:Workload instead

Additional Cloud Provider Dimensions

The following dimensions are built using CostFormation and published by CloudZero for all organizations. They are available in the Explorer and Views.

Source IDName in Explorer/Views (Found under Product Dimensions)Description
CZ:Defined:CategoryService CategoryElements consist of the different categories of services similar to what you would see in the AWS console (e.g. Networking, Compute, etc.)
CZ:Defined:ElasticityElasticity
CZ:Defined:InstanceTypeInstance TypeElements are grouped by a sub-section of the UsageType name and filtered to show costs specifically related to the type, size, and family of a resource. This pertains to services like AmazonEC2, AmazonES, ElasticMapReduce, AmazonRDS, AmazonElastiCache, and AmazonSageMaker.
CZ:Defined:NetworkingCategoryNetworking CategoryElements comprising the major types of networking spend, including VPC Endpoints, Data Transfer, Content Delivery, etc.
CZ:Defined:NetworkingSubCategoryNetworking Sub-categoryElements comprising a deeper breakdown of networking related costs, including VPC Endpoint (Hours), VPC Endpoint (Bytes), AWS Outbound, S3 Outbound, etc.
CZ:Defined:PaymentOptionPayment Option
CZ:Defined:ResourceNameOnlyNot Available
CZ:Defined:ServiceDisplayNot Available
CZ:Defined:ResourceSummaryIDThis dimension is by default the base of the hierarchy when a user drills down in the explorer. This dimension groups resources that tend to be copious and are logically related (such as EKS Clusters) into elements, while leaving resources that are standalone (such as database servers or lambdas) as individual elements.

Custom Dimensions

All Custom Dimensions are available in the Explorer and Views.

Source IDName in Explorer/ViewsDescription
User:Defined:<Dimension ID><Dimension Name>Elements are grouped according to the logic in the CostFormation definition.

Transforms

Lower

This transform will lowercase all of the letters in the source value. This transform has no parameters.

  - Type: Lower

Example:

Source ValueTransform Result
ProductionResource 1productionresource 1

Normalize

This transform will lowercase all of the letters in a the source value and will also convert any instance of the characters .,/#!$%^&*;:=_ ~()\' to a dash (-). This transform has no parameters.

  - Type: Normalize

Example:

Source ValueTransform Result
Production/Resources#4561production-resources-4561

Split

This transform will split the source value into a list of substrings using a specified delimiter. It will then extract the substring based on the specified index. The index is 1 based.

  - Type: Split
    Delimiter: <delimiter>
    Index: <1 based index>

Example:

ParametersSource ValueTransform Result
Delimiter: '-'
Index: 1
eu-west-1eu