Skip to content

Instantly share code, notes, and snippets.

@bharatmicrosystems
Created July 18, 2021 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bharatmicrosystems/835680efbfbb775395c0b0a132b072ee to your computer and use it in GitHub Desktop.
Save bharatmicrosystems/835680efbfbb775395c0b0a132b072ee to your computer and use it in GitHub Desktop.
provider "kubectl" {
host = module.gke_auth.host
cluster_ca_certificate = module.gke_auth.cluster_ca_certificate
token = module.gke_auth.token
load_config_file = false
}
data "kubectl_file_documents" "namespace" {
content = file("../manifests/argocd/namespace.yaml")
}
data "kubectl_file_documents" "argocd" {
content = file("../manifests/argocd/install.yaml")
}
resource "kubectl_manifest" "namespace" {
count = length(data.kubectl_file_documents.namespace.documents)
yaml_body = element(data.kubectl_file_documents.namespace.documents, count.index)
override_namespace = "argocd"
}
resource "kubectl_manifest" "argocd" {
depends_on = [
kubectl_manifest.namespace,
]
count = length(data.kubectl_file_documents.argocd.documents)
yaml_body = element(data.kubectl_file_documents.argocd.documents, count.index)
override_namespace = "argocd"
}
@miodziarz12
Copy link

where is stored file named ../manifests/argocd/install.yaml . it is mentioned but how it look like ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment