Created
March 4, 2022 18:56
-
-
Save micahnoland/ac97d81636cfe9de9470ec4c4118fa66 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" | |
} | |
} | |
} | |
resource "kustomization_resource" "argo_managed" { | |
for_each = var.argo_managed_ids | |
manifest = var.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
variable "argo_managed_ids" { | |
type = set(string) | |
} | |
variable "argo_managed_manifests" { | |
type = map | |
} |
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
data "kustomization_build" "argo_managed" { | |
path = "${path.module}/modules/bootstrap_managed/argocd" | |
} | |
module "bootstrap_managed" { | |
source = "./modules/bootstrap_managed" | |
argo_managed_ids = var.managed_cluster_bootstrap ? data.kustomization_build.argo_managed.ids : [] | |
argo_managed_manifests = var.managed_cluster_bootstrap ? data.kustomization_build.argo_managed.manifests : {} | |
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