File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed
services/monitoring/grafana Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ terraform/plan.cache:
2727 @exit 1
2828
2929.PHONY : terraform-plan
30- terraform-plan : $(REPO_CONFIG_LOCATION ) $(TF_STATE_FILE ) ensure-grafana-online # # terraform plan
30+ terraform-plan : $(REPO_CONFIG_LOCATION ) $(TF_STATE_FILE ) ensure-grafana-online assets # # terraform plan
3131 # terraform plan
3232 @set -a; source $< ; set +a; \
3333 terraform -chdir=./terraform plan -out=plan.cache
Original file line number Diff line number Diff line change @@ -23,3 +23,18 @@ resource "grafana_data_source" "tempo" {
2323 basic_auth_enabled = false
2424 is_default = false
2525}
26+
27+ resource "grafana_data_source" "cloudwatch" {
28+ type = " cloudwatch"
29+ name = " cloudwatch"
30+
31+ json_data_encoded = jsonencode ({
32+ defaultRegion = var.AWS_DEFAULT_REGION
33+ authType = " keys"
34+ })
35+
36+ secure_json_data_encoded = jsonencode ({
37+ accessKey = var.AWS_GRAFANA_CLOUDWATCH_DATASOURCE_USER_ACCESS_KEY
38+ secretKey = var.AWS_GRAFANA_CLOUDWATCH_DATASOURCE_USER_SECRET_KEY
39+ })
40+ }
Original file line number Diff line number Diff line change @@ -18,3 +18,18 @@ variable "PROMETHEUS_CATCHALL_URL" {
1818 description = " Prometheus Catchall URL"
1919 sensitive = false
2020}
21+
22+ variable "AWS_DEFAULT_REGION" {
23+ description = " AWS Default Region"
24+ sensitive = false
25+ }
26+
27+ variable "AWS_GRAFANA_CLOUDWATCH_DATASOURCE_USER_ACCESS_KEY" {
28+ description = " AWS Grafana Cloudwatch User Access Key"
29+ sensitive = true
30+ }
31+
32+ variable "AWS_GRAFANA_CLOUDWATCH_DATASOURCE_USER_SECRET_KEY" {
33+ description = " AWS Grafana Cloudwatch User Secret Key"
34+ sensitive = true
35+ }
You can’t perform that action at this time.
0 commit comments