mirror of
https://github.com/storytold/terraform-aws-observability-accelerator.git
synced 2026-10-09 00:09:43 +00:00
Fix dependency issue
This commit is contained in:
@@ -28,7 +28,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
grafana = {
|
grafana = {
|
||||||
source = "grafana/grafana"
|
source = "grafana/grafana"
|
||||||
version = "1.24.0"
|
version = "1.25.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -78,6 +78,17 @@ module "eks_observability_accelerator" {
|
|||||||
tags = local.tags
|
tags = local.tags
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# https://www.terraform.io/language/modules/develop/providers
|
||||||
|
# A module intended to be called by one or more other modules must not contain
|
||||||
|
# any provider blocks.
|
||||||
|
# This allows forcing depedency between base and workloads module
|
||||||
|
provider "grafana" {
|
||||||
|
url = module.eks_observability_accelerator.managed_grafana_workspace_endpoint
|
||||||
|
|
||||||
|
# TODO: manage with Secrets manager
|
||||||
|
auth = var.grafana_api_key
|
||||||
|
}
|
||||||
|
|
||||||
module "workloads_infra" {
|
module "workloads_infra" {
|
||||||
source = "../../workloads/infra"
|
source = "../../workloads/infra"
|
||||||
# source = "aws-ia/terrarom-aws-observability-accelerator/workloads/infra"
|
# source = "aws-ia/terrarom-aws-observability-accelerator/workloads/infra"
|
||||||
@@ -91,16 +102,10 @@ module "workloads_infra" {
|
|||||||
managed_prometheus_workspace_endpoint = module.eks_observability_accelerator.managed_prometheus_workspace_endpoint
|
managed_prometheus_workspace_endpoint = module.eks_observability_accelerator.managed_prometheus_workspace_endpoint
|
||||||
managed_prometheus_workspace_region = module.eks_observability_accelerator.managed_prometheus_workspace_region
|
managed_prometheus_workspace_region = module.eks_observability_accelerator.managed_prometheus_workspace_region
|
||||||
|
|
||||||
|
|
||||||
managed_grafana_workspace_endpoint = module.eks_observability_accelerator.managed_grafana_workspace_endpoint
|
|
||||||
|
|
||||||
# TODO: manage with Secrets manager
|
|
||||||
grafana_api_key = var.grafana_api_key
|
|
||||||
|
|
||||||
# module custom configuration, check module documentation
|
# module custom configuration, check module documentation
|
||||||
# config = {}
|
# config = {}
|
||||||
|
|
||||||
# depends_on = [
|
depends_on = [
|
||||||
# module.eks_observability_accelerator
|
module.eks_observability_accelerator
|
||||||
# ]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ terraform {
|
|||||||
}
|
}
|
||||||
grafana = {
|
grafana = {
|
||||||
source = "grafana/grafana"
|
source = "grafana/grafana"
|
||||||
version = "1.24.0"
|
version = "1.25.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,16 +3,11 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
grafana = {
|
grafana = {
|
||||||
source = "grafana/grafana"
|
source = "grafana/grafana"
|
||||||
version = "1.24.0"
|
version = "1.25.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
provider "grafana" {
|
|
||||||
url = var.managed_grafana_workspace_endpoint
|
|
||||||
auth = var.grafana_api_key
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "helm_release" "kube_state_metrics" {
|
resource "helm_release" "kube_state_metrics" {
|
||||||
count = var.config.enable_kube_state_metrics ? 1 : 0
|
count = var.config.enable_kube_state_metrics ? 1 : 0
|
||||||
chart = var.config.ksm_helm_chart_name
|
chart = var.config.ksm_helm_chart_name
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ variable "eks_cluster_id" {
|
|||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
variable "helm_config" {
|
variable "helm_config" {
|
||||||
description = "Helm Config for Prometheus"
|
description = "Helm Config for Prometheus"
|
||||||
type = any
|
type = any
|
||||||
@@ -39,16 +38,6 @@ variable "managed_prometheus_workspace_region" {
|
|||||||
default = null
|
default = null
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "managed_grafana_workspace_endpoint" {
|
|
||||||
type = string
|
|
||||||
default = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "grafana_api_key" {
|
|
||||||
type = string
|
|
||||||
default = null
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "dashboards_folder_id" {
|
variable "dashboards_folder_id" {
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
locals {
|
locals {
|
||||||
name = "adot-collector-java"
|
name = "adot-collector-java"
|
||||||
namespace = try(var.helm_config.namespace, local.name)
|
namespace = try(var.helm_config.namespace, local.name)
|
||||||
@@ -8,7 +7,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
grafana = {
|
grafana = {
|
||||||
source = "grafana/grafana"
|
source = "grafana/grafana"
|
||||||
version = "1.24.0"
|
version = "1.25.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user