Provides a Datadog metric tag configuration resource. This can be used to modify tag configurations for metrics.
# Manage a tag configuration for a Datadog distribution metric with/without percentiles
resource "datadog_metric_tag_configuration" "example_dist_metric" {
metric_name = "example.terraform.dist.metric"
metric_type = "distribution"
tags = ["sport", "datacenter"]
include_percentiles = false
}
# Manage tag configurations for a Datadog count or gauge metric
resource "datadog_metric_tag_configuration" "example_count_metric" {
metric_name = "example.terraform.count.metric"
metric_type = "count"
tags = ["sport", "datacenter"]
exclude_tags_mode = false
aggregations {
time = "avg"
space = "min"
}
aggregations {
time = "avg"
space = "max"
}
}
metric_name
(String) The metric name for this resource.metric_type
(String) The metric's type. This field can't be updated after creation. Valid values are gauge
, count
, rate
, distribution
.tags
(Set of String) A list of tag keys that will be queryable for your metric.aggregations
(Block Set) A list of queryable aggregation combinations for a count, rate, or gauge metric. By default, count and rate metrics require the (time: sum, space: sum) aggregation and gauge metrics require the (time: avg, space: avg) aggregation. Can only be applied to metrics that have a metric_type
of count, rate, or gauge. (see below for nested schema)exclude_tags_mode
(Boolean) Toggle to include/exclude tags as queryable for your metric. Can only be applied to metrics that have one or more tags configured. Defaults to false
.include_percentiles
(Boolean) Toggle to include/exclude percentiles for a distribution metric. Defaults to false. Can only be applied to metrics that have a metric_type
of distribution.id
(String) The ID of this resource.aggregations
Required:
space
(String) A space aggregation for use in query. Valid values are avg
, max
, min
, sum
.time
(String) A time aggregation for use in query. Valid values are avg
, count
, max
, min
, sum
.Import is supported using the following syntax:
terraform import datadog_metric_tag_configuration.example_dist_metric example.terraform.dist.metric