Module Dependency Graph
Follow this order to apply Terraform safely and avoid dependency issues.
Each module references outputs from upstream modules. The diagram below shows the dependency order - modules must be deployed top-to-bottom. Deploying out of order will result in missing references or Terraform errors.
Note
module.logscale-storage-account depends on
module.azure-kubernetes because the storage module
references k8s_cluster_principal_id to grant the AKS
managed identity read access to the primary storage account during DR
standby. When both modules are included in the same targeted apply
(-target), Terraform resolves this dependency
automatically and creates azure-kubernetes first.
text
module.azure-core (infra)
โโ> module.azure-keyvault (infra)
โโ> module.azure-kubernetes (infra)
โ โโ> module.logscale-storage-account (storage)
โ โโ> module.pre-install (prep)
โ โโ> module.logscale.module.crds (app)
โ โโ> module.logscale (app)
โ โโ> module.traffic-manager [primary only, if manage_traffic_manager=true] (dr)
โ โโ> module.dr-failover-function [secondary only, if dr_failover_function_enabled=true] (dr)
โโ> module.logscale-storage-account (storage)
โโ> module.pre-install (prep)