Skip to content

Commit

Permalink
Refactor monitoring.tf to remove redundant code and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlahbib committed Nov 18, 2024
1 parent f1d6b0f commit b0a7125
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions terraform/monitoring.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,6 @@ resource "kubernetes_namespace" "monitoring" {
depends_on = [aws_eks_cluster.eks_cluster]
}

resource "helm_release" "loki" {
name = "loki"
repository = "https://grafana.github.io/helm-charts"
chart = "loki-stack"
namespace = "monitoring"
create_namespace = true
version = "2.10.2"

set {
name = "promtail.enabled"
value = "true"
}

set {
name = "loki.persistence.enabled"
value = "false"
}

set {
name = "promtail.persistence.enabled"
value = "false"
}
depends_on = [aws_eks_cluster.eks_cluster]
}

resource "helm_release" "tempo" {
name = "tempo"
repository = "https://grafana.github.io/helm-charts"
chart = "tempo"
namespace = "monitoring"
create_namespace = true
version = "1.14.0"
depends_on = [aws_eks_cluster.eks_cluster]
}

resource "kubernetes_config_map" "grafana_datasources" {
metadata {
name = "grafana-datasources"
Expand Down Expand Up @@ -119,3 +84,38 @@ resource "helm_release" "prometheus_operator" {

depends_on = [kubernetes_config_map.grafana_datasources, kubernetes_config_map.grafana_dashboards]
}

resource "helm_release" "loki" {
name = "loki"
repository = "https://grafana.github.io/helm-charts"
chart = "loki-stack"
namespace = "monitoring"
create_namespace = true
version = "2.10.2"

set {
name = "promtail.enabled"
value = "true"
}

set {
name = "loki.persistence.enabled"
value = "false"
}

set {
name = "promtail.persistence.enabled"
value = "false"
}
depends_on = [helm_release.prometheus_operator]
}

resource "helm_release" "tempo" {
name = "tempo"
repository = "https://grafana.github.io/helm-charts"
chart = "tempo"
namespace = "monitoring"
create_namespace = true
version = "1.14.0"
depends_on = [helm_release.prometheus_operator]
}

0 comments on commit b0a7125

Please sign in to comment.