As the TF Grafana provider is defined inline instead of being passed as a parameter to the module, the module cannot be used with TF depends_on
โ Error: Module is incompatible with count, for_each, and depends_on
โ
โ on main.tf line 184, in module "gitlab_runner_monitoring":
โ 184: module.autoscaling-eks.cluster_id
โ
โ The module at
โ module.gitlab_runner_monitoring.module.eks_observability_accelerator is a
โ legacy module which contains its own local provider configurations, and so
โ calls to it may not use the count, for_each, or depends_on arguments.
โ
โ If you also control the module
โ "git::https://github.com/aws-observability/terraform-aws-observability-accelerator.git?ref=tags/v1.5.0",
โ consider updating this module to instead expect provider configurations to
โ be passed by its caller.
Pass the Grafana provider as parameter to the module.
Using depends_on is necessary to ensure correct order in cluster with monitoring creation