mirror of
https://github.com/storytold/terraform-aws-observability-accelerator.git
synced 2026-10-09 00:09:43 +00:00
Adding Module and Example for ECS cluster monitoring with ecs_observer (#211)
* 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>
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
# SSM Parameter for storing and distrivuting the ADOT config
|
||||
resource "aws_ssm_parameter" "adot_config" {
|
||||
name = "/terraform-aws-observability/otel_collector_config"
|
||||
description = "SSM parameter for aws-observability-accelerator/otel-collector-config"
|
||||
type = "String"
|
||||
value = local.ssm_param_value
|
||||
tier = "Intelligent-Tiering"
|
||||
}
|
||||
|
||||
############################################
|
||||
# Managed Grafana and Prometheus Module
|
||||
############################################
|
||||
|
||||
module "managed_grafana_default" {
|
||||
count = var.create_managed_grafana_ws ? 1 : 0
|
||||
|
||||
source = "terraform-aws-modules/managed-service-grafana/aws"
|
||||
version = "2.1.0"
|
||||
name = "${local.name}-default"
|
||||
associate_license = false
|
||||
}
|
||||
|
||||
module "managed_prometheus_default" {
|
||||
count = var.create_managed_prometheus_ws ? 1 : 0
|
||||
|
||||
source = "terraform-aws-modules/managed-service-prometheus/aws"
|
||||
version = "2.2.2"
|
||||
workspace_alias = "${local.name}-default"
|
||||
}
|
||||
|
||||
###########################################
|
||||
# Task Definition for ADOT ECS Prometheus
|
||||
###########################################
|
||||
resource "aws_ecs_task_definition" "adot_ecs_prometheus" {
|
||||
family = "adot_prometheus_td"
|
||||
task_role_arn = var.task_role_arn
|
||||
execution_role_arn = var.execution_role_arn
|
||||
network_mode = "bridge"
|
||||
requires_compatibilities = ["EC2"]
|
||||
cpu = var.ecs_adot_cpu
|
||||
memory = var.ecs_adot_mem
|
||||
container_definitions = local.container_definitions
|
||||
}
|
||||
|
||||
############################################
|
||||
# ECS Service
|
||||
############################################
|
||||
resource "aws_ecs_service" "adot_ecs_prometheus" {
|
||||
name = "adot_prometheus_svc"
|
||||
cluster = var.aws_ecs_cluster_name
|
||||
task_definition = aws_ecs_task_definition.adot_ecs_prometheus.arn
|
||||
desired_count = 1
|
||||
}
|
||||
Reference in New Issue
Block a user