这是一个不存在的问题:请按照下面的描述:https://github.com/grafana/terraform-provider-grafana/issues/691
忽略此处提供的文档:https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/data_source
我希望使用terraform1.3.4在influx2中部署grafana9数据源。管道是稳定的,手动安装流入是没有问题的,其他资源,如通知渠道,可以毫无问题地部署。
问题似乎是json值的编码。
以下配置已成功提交,但在grafana中创建的数据源缺少所有json值。
resource "grafana_data_source" "influxdb" {
type = "influxdb"
name = "influx_terraform"
url = "https://<url:port>"
json_data_encoded = jsonencode({
version = "Flux"
organization = "myOrg"
default_bucket = "bucket"
tls_skip_verify = true
})
secure_json_data_encoded = jsonencode({
auth_token = "token"
})
}下面的代码段将正确设置值,对令牌是安全的。
同样,这种做法也是不可取的。
resource "grafana_data_source" "influxdb2" {
type = "influxdb"
name = "influx_terraform"
url = "https://<url:port>"
json_data {
version = "Flux"
organization = "myOrg"
default_bucket = "bucket"
tls_skip_verify = true
}
secure_json_data {
auth_token = "token"
}
}我遗漏了什么?
发布于 2022-11-15 16:07:10
https://stackoverflow.com/questions/74402027
复制相似问题