Files
terraform-aws-observability…/modules/managed-prometheus-monitoring/main.tf
T
Rodrigue Koffi daed34db80 Compose EKS monitoring modules (#115)
* Move modules around

* Update amp billing source

* Merge Java monitoring to EKS

* Update docs

* Merge nginx pattern

* Pre-commit

* Add save and test URL output

* Move EKS dependencies to EKS monitoring module

* update docs

* Update examples and docs

* Add java doc

* Add NGINX doc

* Update nginx doc

* Fix amp monitoring example path

* Fix pre-commit

* Todo: move to main after merge

* Update docs, fix tags
2023-02-20 18:36:08 +01:00

36 lines
781 B
Terraform

provider "aws" {
region = "us-east-1"
alias = "billing_region"
}
locals {
name = "aws-observability-accelerator-cloudwatch"
amp_list = toset(split(",", var.managed_prometheus_workspace_ids))
}
resource "grafana_data_source" "cloudwatch" {
type = "cloudwatch"
name = local.name
# Giving priority to Managed Prometheus datasources
is_default = false
json_data {
default_region = var.aws_region
sigv4_auth = true
sigv4_auth_type = "workspace-iam-role"
sigv4_region = var.aws_region
}
}
resource "grafana_dashboard" "this" {
folder = var.dashboards_folder_id
config_json = file("${path.module}/dashboards/amp-dashboard.json")
}
module "billing" {
source = "./billing"
providers = {
aws = aws.billing_region
}
}