Last updated: September 18, 2026
dash0_time_series_aggregation
Manages a Dash0 Time Series Aggregation. Time series aggregations roll up raw metric data points into pre-aggregated series, reducing cardinality and query cost while keeping the dimensions you care about.
Every time series aggregation API call requires the organization-admin role. A token without it is rejected with a 403 naming the missing role.
Origins are unique per organization, while each aggregation belongs to exactly one dataset. Applying the same document to a second dataset under the same origin is rejected by the API. Terraform is structurally safe here because every resource instance generates its own random tf_-prefixed origin, but note that dataset is RequiresReplace: changing it destroys the aggregation and re-creates it under a new origin.
spec.enabled is required. The provider always sends a value for it, so an omitted field would silently create a disabled aggregation and later switch off one enabled elsewhere.
Resource-level attribute aggregation (spec.attributeModifications[].spec.context: resource) is not supported by the Dash0 web app today. The provider passes the value through unvalidated, matching the Dash0 CLI, so it may be accepted by the API but not reflected in the UI.
Example Usage
1234resource "dash0_time_series_aggregation" "http_server_request_duration" {dataset = "default"time_series_aggregation_yaml = file("${path.module}/time_series_aggregation.yaml")}
Schema
Required
time_series_aggregation_yaml(String) The time series aggregation definition in YAML format. The YAML must declarekind: Dash0TimeSeriesAggregation, an explicitspec.enabled, and aspecdescribing which metrics to match and how to aggregate them.spec.priorityis defaulted by the server (to2) and is excluded from drift detection when omitted from the configuration. Allmetadata.labelsare server-managed and ignored during drift detection.
Optional
dataset(String) The identifier of the Dash0 dataset that the time series aggregation belongs to. Provide the dataset's identifier, which is immutable, not the 'name'. Datasets are used to separate observability data within a Dash0 organization. If omitted, the provider-leveldatasetdefault is used (see the provider'sdatasetattribute). Changing this value forces the resource to be recreated under a new origin.
Read-Only
id(String) The server-assigned UUID of the time series aggregation, resolved by the provider after creation. Reference this value when wiring the aggregation's identifier into another resource.origin(String) A unique identifier for the time series aggregation, automatically generated on creation. Used to reference the aggregation for updates, reads, deletes, and imports. Origins are unique per organization.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
12#!/bin/bashterraform import dash0_time_series_aggregation.http_server_request_duration default,tf_existing-time-series-aggregation-origin