mirror of
https://github.com/storytold/terraform-aws-observability-accelerator.git
synced 2026-10-09 00:09:43 +00:00
70405b9732
* Adding Module and Example for ECS cluster monitoring with ecs_observer * Adding Module and Example for ECS cluster monitoring with ecs_observer * Incorporating PR comments * Restructuring Examples and modules folder for ECS, Added content in main Readme * Fixing path as per PR comments * Parameterzing the config files, incorporated PR review comments * Adding condition for AMP WS and fixing AMP endpoint * Adding Document for ECS Monitoring and parameterized some variables * Added sample dashboard * Adding Document for ECS Monitoring and parameterized some variables * Fixing failures detected by pre-commit * Fixing failures detected by pre-commit * Fixing failures detected by pre-commit * Pre-commit fixes * Fixing failures detected by pre-commit * Fixing failures detected by pre-commit * Pre-commit * Fixing HIGH security alerts detected by pre-commit * Fixing HIGH security alerts detected by pre-commit * Fixing HIGH security alerts detected by pre-commit, 31stOct * Add links after merge * 2ndNov - Added condiotnal creation for Grafana WS and module versions for AMG, AMP --------- Co-authored-by: Rodrigue Koffi <bonclay7@users.noreply.github.com>
33 lines
1.3 KiB
Terraform
33 lines
1.3 KiB
Terraform
data "aws_region" "current" {}
|
|
|
|
locals {
|
|
region = data.aws_region.current.name
|
|
name = "amg-ex-${replace(basename(path.cwd), "_", "-")}"
|
|
description = "AWS Managed Grafana service for ${local.name}"
|
|
prometheus_ws_endpoint = module.managed_prometheus_default[0].workspace_prometheus_endpoint
|
|
|
|
default_otel_values = {
|
|
aws_region = data.aws_region.current.name
|
|
cluster_name = var.aws_ecs_cluster_name
|
|
cluster_region = data.aws_region.current.name
|
|
refresh_interval = var.refresh_interval
|
|
ecs_metrics_collection_interval = var.ecs_metrics_collection_interval
|
|
amp_remote_write_ep = "${local.prometheus_ws_endpoint}api/v1/remote_write"
|
|
otlp_grpc_endpoint = var.otlp_grpc_endpoint
|
|
otlp_http_endpoint = var.otlp_http_endpoint
|
|
}
|
|
|
|
ssm_param_value = yamlencode(
|
|
templatefile("${path.module}/configs/config.yaml", local.default_otel_values)
|
|
)
|
|
|
|
container_def_default_values = {
|
|
container_name = var.container_name
|
|
otel_image_ver = var.otel_image_ver
|
|
aws_region = data.aws_region.current.name
|
|
}
|
|
|
|
container_definitions = templatefile("${path.module}/task-definitions/otel_collector.json", local.container_def_default_values)
|
|
|
|
}
|