Last active
March 4, 2022 18:59
-
-
Save micahnoland/517da4d27064a5c1e9cfba8ef0f2704a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
kustomization = { | |
source = "kbst/kustomization" | |
version = ">= 0.7.0" | |
} | |
} | |
} | |
data "kustomization_build" "argo_managed" { | |
path = "${path.module}/argocd" | |
} | |
resource "kustomization_resource" "argo_managed" { | |
for_each = data.kustomization_build.argo_managed.ids | |
manifest = data.kustomization_build.argo_managed.manifests[each.value] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module "bootstrap_managed" { | |
source = "./bootstrap_managed" | |
count = var.managed_cluster_bootstrap ? 1 : 0 | |
/* using count like this will throw an error: | |
The "for_each" value depends on resource attributes that cannot be determined | |
until apply, so Terraform cannot predict how many instances will be created. | |
*/ | |
cluster_name = local.cluster_name | |
depends_on = [module.bootstrap_common] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment