FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit b9fb91e4 authored by Ryan Kowalewski's avatar Ryan Kowalewski :man_dancing:
Browse files

update dashboard.tf to use templatefile built-in func

This removes the dependency on the deprecated hashicorp/template provider.
parent 64a1aa6d
No related branches found
No related tags found
1 merge request!51Fix multiple longstanding issues
......@@ -5,18 +5,15 @@
# - Request latencies for 50th, 95th and 99th percentile.
# - Container CPU and memory utilisations for 50th, 95th and 99th percentile.
# - Container instance count and billable instance time.
data "template_file" "dashboard_json" {
count = var.create_monitoring_dashboard ? 1 : 0
template = file("${path.module}/dashboard.json")
vars = {
locals {
dashboard_template = templatefile("${path.module}/dashboard.json", {
service_name = var.name
region = var.cloud_run_region
}
})
}
resource "google_monitoring_dashboard" "dashboard" {
for_each = toset([for template in data.template_file.dashboard_json : template.rendered])
dashboard_json = each.key
count = var.create_monitoring_dashboard ? 1 : 0
dashboard_json = local.dashboard_template
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment