Skip to content

Instantly share code, notes, and snippets.

@bharatmicrosystems
Created July 18, 2021 07:12
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/b2004218e0390fd99e01f59cc249160f to your computer and use it in GitHub Desktop.
Save bharatmicrosystems/b2004218e0390fd99e01f59cc249160f to your computer and use it in GitHub Desktop.
data "kubectl_file_documents" "my-nginx-app" {
content = file("../manifests/argocd/my-nginx-app.yaml")
}
resource "kubectl_manifest" "my-nginx-app" {
depends_on = [
kubectl_manifest.argocd,
]
count = length(data.kubectl_file_documents.my-nginx-app.documents)
yaml_body = element(data.kubectl_file_documents.my-nginx-app.documents, count.index)
override_namespace = "argocd"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment