Make creation of Grafana Data Source and Folder configurable (#145)

* Made the cluster variable visible in dashboards

* Made the repo reusable with multiple EKS clusters

* Relabled the input variable from create_grafana_data_source to create_prometheus_data_source
This commit is contained in:
Vijay Chintalapati
2023-04-06 02:04:29 -07:00
committed by GitHub
parent cd28d9975a
commit caeebe0e1a
16 changed files with 58 additions and 14 deletions
@@ -1,4 +1,5 @@
resource "aws_prometheus_rule_group_namespace" "recording_rules" {
count = var.enable_recording_rules ? 1 : 0
name = "accelerator-java-rules"
workspace_id = var.managed_prometheus_workspace_id
data = <<EOF
@@ -31,6 +32,7 @@ EOF
}
resource "grafana_dashboard" "this" {
count = var.enable_dashboards ? 1 : 0
folder = var.dashboards_folder_id
config_json = file("${path.module}/dashboards/default.json")
}