From d5a0c28c11b1379833acdb7520cc7c4dc9bb4d45 Mon Sep 17 00:00:00 2001 From: Stanislav Kopp Date: Wed, 27 Aug 2025 09:44:37 +0200 Subject: [PATCH] format --- grafana/datasource/datasource.tf | 4 ++-- grafana/datasource/variables.tf | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/grafana/datasource/datasource.tf b/grafana/datasource/datasource.tf index 34a22fe..dd31ba8 100644 --- a/grafana/datasource/datasource.tf +++ b/grafana/datasource/datasource.tf @@ -71,7 +71,7 @@ resource "grafana_data_source_config" "loki_derived_fields" { for_each = { for k, v in var.datasources : k => v if v.type == "loki" && v.derived_fields != null } - uid = grafana_data_source.this[each.key].uid + uid = grafana_data_source.this[each.key].uid json_data_encoded = jsonencode({ derivedFields = [ for field in each.value.derived_fields : { @@ -94,7 +94,7 @@ resource "grafana_data_source_config" "tempo_traces_to_logs" { for_each = { for k, v in var.datasources : k => v if v.type == "tempo" && v.traces_to_logs != null } - uid = grafana_data_source.this[each.key].uid + uid = grafana_data_source.this[each.key].uid json_data_encoded = jsonencode({ tracesToLogsV2 = { datasourceUid = grafana_data_source.this[each.value.traces_to_logs.target_datasource_name].uid diff --git a/grafana/datasource/variables.tf b/grafana/datasource/variables.tf index b505e8d..a349c98 100644 --- a/grafana/datasource/variables.tf +++ b/grafana/datasource/variables.tf @@ -5,18 +5,18 @@ Each datasource specifies type, keys to lookup URL/user/password, and optional configurations for linking data sources. EOT type = map(object({ - type = string - url_key = string - pass_key = optional(string) - is_default = optional(bool) + type = string + url_key = string + pass_key = optional(string) + is_default = optional(bool) # Key to look up a database username - db_user_key = optional(string) + db_user_key = optional(string) # Key to look up a basic auth username - basic_auth_user_key = optional(string) + basic_auth_user_key = optional(string) # Non-sensitive JSON data for Postgres, etc. - json_data = optional(map(any)) + json_data = optional(map(any)) # Linking Attributes (for Loki/Tempo) derived_fields = optional(list(object({