1 year ago
#79446
Ayush Ujjwal
How to compare template variable in terraform [Datadog]
I am creating a dashboard that has different types of widgets. I want to make this dashboard as customizable as possible using the template variables. For this reason, I have a template variable that stores the env value.
In a service summary widget, it needs env value. Now, I am using the template variable to get the value there but it is not working.
widget {
trace_service_definition {
display_format = "two_column"
==> env = "$env.value"
service = "abcd"
show_breakdown = true
show_distribution = true
show_errors = true
show_hits = true
show_latency = true
show_resource_list = false
size_format = "medium"
span_name = "metric.name.client"
title = "Service summary"
}
widget_layout {
x = 0
y = 2
width = 8
height = 9
}
}
Template variable
template_variable {
name = "env"
prefix = "env"
default = "dev"
}
Is there a way to use the template variable to get the value?
terraform
template-variables
terraform-provider
0 Answers
Your Answer