mirror of
https://github.com/storytold/terraform-aws-observability-accelerator.git
synced 2026-10-09 00:09:43 +00:00
71b6f352bf
* Managed Grafana Workspace with Identity Centre Users (#83) * update kuberenetes and instance type * initial setup of managed grafana workspace and identity centre identities * cleanup * run precommit * output grafana workspace ID * add identity store id variable * remove API key * update outputs naming convention as per terraform guidelines * update docs and add versions * update variables type * update naming conventions * add managed policy arn for querying promethues * update readme * update workshop references to this * add role arn type * cleanup and simplification * remove workshop --------- Co-authored-by: charlie keegan <chakeega@amazon.com> Co-authored-by: Rodrigue Koffi <bonclay7@users.noreply.github.com> * Rename example * Update grafana example and base module references * Update example's reference * Cleanup and docs ref * Add docs * Update docs * TODO: add link after merge * Update managed-grafana.md --------- Co-authored-by: Charlie Keegan <91210223+charliekeeegan@users.noreply.github.com> Co-authored-by: charlie keegan <chakeega@amazon.com> Co-authored-by: Mark Beacom <7315957+mbeacom@users.noreply.github.com>
44 lines
895 B
Terraform
44 lines
895 B
Terraform
resource "aws_prometheus_workspace" "this" {
|
|
count = var.enable_managed_prometheus ? 1 : 0
|
|
|
|
alias = local.name
|
|
tags = var.tags
|
|
}
|
|
|
|
resource "aws_prometheus_alert_manager_definition" "this" {
|
|
count = var.enable_alertmanager ? 1 : 0
|
|
|
|
workspace_id = local.amp_ws_id
|
|
|
|
definition = <<EOF
|
|
alertmanager_config: |
|
|
route:
|
|
receiver: 'default'
|
|
receivers:
|
|
- name: 'default'
|
|
EOF
|
|
}
|
|
|
|
provider "grafana" {
|
|
url = local.amg_ws_endpoint
|
|
auth = var.grafana_api_key
|
|
}
|
|
|
|
resource "grafana_data_source" "amp" {
|
|
type = "prometheus"
|
|
name = local.name
|
|
is_default = true
|
|
url = local.amp_ws_endpoint
|
|
json_data {
|
|
http_method = "GET"
|
|
sigv4_auth = true
|
|
sigv4_auth_type = "workspace-iam-role"
|
|
sigv4_region = local.amp_ws_region
|
|
}
|
|
}
|
|
|
|
# dashboards
|
|
resource "grafana_folder" "this" {
|
|
title = "Observability Accelerator Dashboards"
|
|
}
|