56 lines
No EOL
1.7 KiB
HCL
56 lines
No EOL
1.7 KiB
HCL
variable "datasources" {
|
|
description = <<EOT
|
|
Map of datasources to create. Keys are datasource names.
|
|
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)
|
|
|
|
# Key to look up a database username
|
|
db_user_key = optional(string)
|
|
# Key to look up a basic auth username
|
|
basic_auth_user_key = optional(string)
|
|
|
|
# ADDED BACK: Non-sensitive JSON data for Postgres, etc.
|
|
json_data = optional(map(any))
|
|
|
|
# Linking Attributes (for Loki/Tempo)
|
|
derived_fields = optional(list(object({
|
|
target_datasource_name = string
|
|
matcher_regex = string
|
|
name = string
|
|
url = string
|
|
})))
|
|
traces_to_logs = optional(object({
|
|
target_datasource_name = string
|
|
query = string
|
|
custom_query = optional(bool)
|
|
filter_by_span_id = optional(bool)
|
|
filter_by_trace_id = optional(bool)
|
|
span_start_time_shift = optional(string)
|
|
span_end_time_shift = optional(string)
|
|
}))
|
|
}))
|
|
}
|
|
|
|
variable "datasource_urls" {
|
|
description = "Map of datasource URLs, keyed by url_key"
|
|
type = map(string)
|
|
sensitive = true
|
|
}
|
|
|
|
variable "datasource_users" {
|
|
description = "Map of datasource usernames, keyed by db_user_key or basic_auth_user_key"
|
|
type = map(string)
|
|
sensitive = true
|
|
}
|
|
|
|
variable "datasource_passwords" {
|
|
description = "Map of datasource passwords, keyed by pass_key"
|
|
type = map(string)
|
|
sensitive = true
|
|
} |