-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall-applications.tf
40 lines (34 loc) · 1.35 KB
/
install-applications.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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("../charts/argo-cd/manifests/argocd/namespace.yaml")
}
data "kubectl_file_documents" "argocd" {
content = file("../charts/argo-cd/manifests/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"
}
data "kubectl_file_documents" "airflow" {
content = file("../applications/airflow/airflow-app.yml")
}
resource "kubectl_manifest" "airflow" {
depends_on = [
kubectl_manifest.argocd,
]
count = length(data.kubectl_file_documents.airflow.documents)
yaml_body = element(data.kubectl_file_documents.airflow.documents, count.index)
override_namespace = "argocd"
}