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>
92 lines
3.5 KiB
Terraform
92 lines
3.5 KiB
Terraform
module "aws_observability_accelerator" {
|
|
source = "../../../terraform-aws-observability-accelerator"
|
|
aws_region = var.eks_cluster_1_region
|
|
enable_managed_prometheus = false
|
|
enable_alertmanager = true
|
|
grafana_api_key = var.grafana_api_key
|
|
managed_prometheus_workspace_region = null
|
|
managed_prometheus_workspace_id = var.managed_prometheus_workspace_id
|
|
managed_grafana_workspace_id = var.managed_grafana_workspace_id
|
|
|
|
providers = {
|
|
aws = aws.eks_cluster_1
|
|
}
|
|
}
|
|
|
|
module "eks_cluster_1_monitoring" {
|
|
source = "../../../terraform-aws-observability-accelerator//modules/eks-monitoring"
|
|
eks_cluster_id = var.eks_cluster_1_id
|
|
enable_amazon_eks_adot = true
|
|
enable_cert_manager = true
|
|
enable_java = true
|
|
|
|
# This configuration section results in actions performed on AMG and AMP; and it needs to be done just once
|
|
# And hence, this in performed in conjunction with the setup of the eks_cluster_1 EKS cluster
|
|
enable_dashboards = true
|
|
enable_external_secrets = true
|
|
enable_fluxcd = true
|
|
enable_alerting_rules = true
|
|
enable_recording_rules = true
|
|
|
|
grafana_api_key = var.grafana_api_key
|
|
managed_prometheus_workspace_id = module.aws_observability_accelerator.managed_prometheus_workspace_id
|
|
managed_prometheus_workspace_endpoint = module.aws_observability_accelerator.managed_prometheus_workspace_endpoint
|
|
managed_prometheus_workspace_region = module.aws_observability_accelerator.managed_prometheus_workspace_region
|
|
grafana_url = module.aws_observability_accelerator.managed_grafana_workspace_endpoint
|
|
|
|
prometheus_config = {
|
|
global_scrape_interval = "60s"
|
|
global_scrape_timeout = "15s"
|
|
scrape_sample_limit = 2000
|
|
}
|
|
|
|
providers = {
|
|
aws = aws.eks_cluster_1
|
|
kubernetes = kubernetes.eks_cluster_1
|
|
helm = helm.eks_cluster_1
|
|
grafana = grafana
|
|
}
|
|
|
|
depends_on = [
|
|
module.aws_observability_accelerator
|
|
]
|
|
}
|
|
|
|
module "eks_cluster_2_monitoring" {
|
|
source = "../../../terraform-aws-observability-accelerator//modules/eks-monitoring"
|
|
eks_cluster_id = var.eks_cluster_2_id
|
|
enable_amazon_eks_adot = true
|
|
enable_cert_manager = true
|
|
enable_java = true
|
|
|
|
# Since the following were enabled in conjunction with the set up of the
|
|
# eks_cluster_1 EKS cluster, we will skip them with the eks_cluster_2 EKS cluster
|
|
enable_dashboards = false
|
|
enable_external_secrets = false
|
|
enable_fluxcd = false
|
|
enable_alerting_rules = false
|
|
enable_recording_rules = false
|
|
|
|
managed_prometheus_workspace_id = module.aws_observability_accelerator.managed_prometheus_workspace_id
|
|
managed_prometheus_workspace_endpoint = module.aws_observability_accelerator.managed_prometheus_workspace_endpoint
|
|
managed_prometheus_workspace_region = module.aws_observability_accelerator.managed_prometheus_workspace_region
|
|
grafana_url = module.aws_observability_accelerator.managed_grafana_workspace_endpoint
|
|
|
|
prometheus_config = {
|
|
global_scrape_interval = "60s"
|
|
global_scrape_timeout = "15s"
|
|
scrape_sample_limit = 2000
|
|
}
|
|
|
|
providers = {
|
|
aws = aws.eks_cluster_2
|
|
kubernetes = kubernetes.eks_cluster_2
|
|
helm = helm.eks_cluster_2
|
|
grafana = grafana
|
|
}
|
|
|
|
depends_on = [
|
|
module.aws_observability_accelerator
|
|
]
|
|
}
|