Skip to content

Commit

Permalink
Merge pull request #84 from XenitAB/feture/module-depends-on2
Browse files Browse the repository at this point in the history
Add module depends_on
  • Loading branch information
simongottschlag authored Dec 10, 2020
2 parents 5b0ab4b + a180a2c commit 5007a0b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions modules/kubernetes/aks-core/modules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module "opa_gatekeeper" {

exclude = [
{
excluded_namespaces = ["kube-system", "gatekeeper-system", "aad-pod-identity", "cert-manager", "ingress-nginx", "velero", "azdo-proxy", "flux-system"]
excluded_namespaces = ["kube-system", "gatekeeper-system", "aad-pod-identity", "cert-manager", "ingress-nginx", "velero", "azdo-proxy", "flux-system", "external-dns"]
processes = ["*"]
}
]
Expand All @@ -31,7 +31,8 @@ module "opa_gatekeeper" {

# FluxCD v1
module "fluxcd_v1_azure_devops" {
depends_on = [kubernetes_namespace.tenant]
depends_on = [kubernetes_namespace.tenant, module.opa_gatekeeper]

for_each = {
for s in ["fluxcd-v1"] :
s => s
Expand Down Expand Up @@ -91,7 +92,8 @@ module "fluxcd_v2_github" {

# AAD-Pod-Identity
module "aad_pod_identity" {
depends_on = [kubernetes_namespace.tenant]
depends_on = [kubernetes_namespace.tenant, module.opa_gatekeeper]

for_each = {
for s in ["aad-pod-identity"] :
s => s
Expand All @@ -108,6 +110,8 @@ module "aad_pod_identity" {

# Ingress Nginx
module "ingress_nginx" {
depends_on = [module.opa_gatekeeper]

for_each = {
for s in ["ingress-nginx"] :
s => s
Expand All @@ -119,6 +123,8 @@ module "ingress_nginx" {

# External DNS
module "external_dns" {
depends_on = [module.opa_gatekeeper, module.aad_pod_identity]

for_each = {
for s in ["external-dns"] :
s => s
Expand All @@ -139,6 +145,8 @@ module "external_dns" {

# Cert Manager
module "cert_manager" {
depends_on = [module.opa_gatekeeper]

for_each = {
for s in ["cert-manager"] :
s => s
Expand All @@ -152,6 +160,8 @@ module "cert_manager" {

# Velero
module "velero" {
depends_on = [module.opa_gatekeeper]

for_each = {
for s in ["velero"] :
s => s
Expand Down
2 changes: 1 addition & 1 deletion modules/kubernetes/ingress-nginx/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ resource "kubernetes_namespace" "this" {
}
}

resource "helm_release" "ingres_nginx" {
resource "helm_release" "ingress_nginx" {
repository = "https://kubernetes.github.io/ingress-nginx"
chart = "ingress-nginx"
name = "ingress-nginx"
Expand Down

0 comments on commit 5007a0b

Please sign in to comment.