mirror of
https://github.com/storytold/terraform-aws-observability-accelerator.git
synced 2026-10-09 00:09:43 +00:00
fa38a90efc
* Typo * Remove Grafana provider * Temp: move dashbaords to gitOps * Move external labels to resource attributes * Avoid DDoS with using 0.0.0.0 * Pre-commit * Transition in two steps Will need to remove provider in a separate version to provide a transition path as removing this will break terraform and leave orphans in the state * Move patterns' dashboards creation to gitOps Standardize config objects for patterns as well * Pre-commit * Create AMP dashboard from external source with Grafana provider * Fix deprecated option * Fix Flux requirements * Run pre-commit * Update example with operator * Cleanup examples * Update multicluster example * Update multicluster example * Drop dead variable * Update docs * Change GitOps branch name * Update docs * Replacing Secrets Manager to SSM to store Grafana API Key (#178) * Fixing SSM * Fixing SSM * Replacing Secrets Manager with SSM * Replacing Secrets Manager with SSM * Update architecture diagram * Update architecture diagram * Update README.md * Update index.md * Fixing Grafana Operator Version * Fix multicluster example * Update docs --------- Co-authored-by: Ela AWS <51791117+elamaran11@users.noreply.github.com> Co-authored-by: Elamaran Shanmugam <elamaran.shan@gmail.com>
44 lines
1.0 KiB
Terraform
44 lines
1.0 KiB
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_encoded = jsonencode({
|
|
default_region = var.aws_region
|
|
sigv4_auth = true
|
|
sigv4_auth_type = "workspace-iam-role"
|
|
sigv4_region = var.aws_region
|
|
})
|
|
}
|
|
|
|
data "http" "dashboard" {
|
|
url = "https://raw.githubusercontent.com/aws-observability/aws-observability-accelerator/a72787328e493c4628680487e3c885fc395d1c56/artifacts/grafana-dashboards/amp/amp-dashboard.json"
|
|
|
|
request_headers = {
|
|
Accept = "application/json"
|
|
}
|
|
}
|
|
|
|
resource "grafana_dashboard" "this" {
|
|
folder = var.dashboards_folder_id
|
|
config_json = data.http.dashboard.response_body
|
|
}
|
|
|
|
module "billing" {
|
|
source = "./billing"
|
|
providers = {
|
|
aws = aws.billing_region
|
|
}
|
|
}
|