secure json data encoded
Jump to navigation
Jump to search
resource "grafana_data_source" "arbitrary-data" { type = "stackdriver" name = "sd-arbitrary-data" json_data_encoded = jsonencode({ "tokenUri" = "https://oauth2.googleapis.com/token" "authenticationType" = "jwt" "defaultProject" = "default-project" "clientEmail" = "[email protected]" }) secure_json_data_encoded = jsonencode({ "privateKey" = "-----BEGIN PRIVATE KEY-----\nprivate-key\n-----END PRIVATE KEY-----\n" }) }
resource "grafana_data_source" "your_name" {
type = "influxdb"
name = "Your Name"
url = "https://xxxxxx.xxxxinfluxdb.eu-central-1.on.aws:8086"
basic_auth_enabled = true
basic_auth_username = "grafana"
database_name = "your_db"
json_data_encoded = jsonencode({
authType = "default"
})
secure_json_data_encoded = jsonencode({
password = data.sops_file.influx_db_users.data.grafana_read_only_token
basicAuthPassword = data.sops_file.influx_db_users.data.grafana_read_only_token
})
}
See also
Advertising: