Invalid character 'f' after object key:value pair

I am trying to provide a query to grafana dashboards json from outside using templatefile but facing the error : invalid character ‘f’ after object key:value pair

data “template_file” “cluster_monitoring_template” {
template = file(“${path.module}/monitoring.json”)

vars = {
CLUSTER_ABNORMAL_PODS_QUERY = “sum by (namespace) (kube_pod_status_ready{condition=\“false\”})”
}
}

inside the monitoring.json i am using it as below :

“expr”: “${CLUSTER_ABNORMAL_PODS_QUERY}”,

Issue resolved by putting the query in this way :

“sum by (namespace) (kube_pod_status_ready{condition=‘false’})”

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.