-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathargocd-config.tf
63 lines (52 loc) · 2.05 KB
/
argocd-config.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
########################## ArgoCD Repository ##############################
resource "local_file" "argocd_repository" {
filename = "templates/argocd-repo.yaml"
content = file("${path.module}/templates/argocd-repo.yaml")
}
resource "null_resource" "argocd_repository" {
provisioner "local-exec" {
command = <<EOT
aws eks update-kubeconfig --region ${local.region} --name ${local.cluster_name} ;
kubectl apply -f ${local_file.argocd_repository.filename}
EOT
}
depends_on = [module.eks, module.eks-blueprints-addons]
}
########################## ArgoCD App of Apps ##############################
resource "null_resource" "app_of_apps" {
provisioner "local-exec" {
command = <<EOT
aws eks update-kubeconfig --region ${local.region} --name ${local.cluster_name} ;
helm template apps/ | kubectl apply -f -
EOT
}
depends_on = [module.eks, module.eks-blueprints-addons]
}
########################### ArgoCD Application Set ##########################
# resource "local_file" "argocd_appset" {
# filename = "templates/argocd-appset.yaml"
# content = file("${path.module}/templates/argocd-appset.yaml")
# }
# resource "null_resource" "argocd_appset" {
# provisioner "local-exec" {
# command = <<EOT
# aws eks update-kubeconfig --region ${local.region} --name ${local.cluster_name} ;
# kubectl apply -f ${local_file.argocd_appset.filename}
# EOT
# }
# depends_on = [module.eks, module.eks-blueprints-addons]
# }
########################### ArgoCD application ##############################
### Uncomment if you want to deploy only the 2048 game.
# resource "local_file" "argocd_app_game" {
# filename = "templates/argocd-apps.yaml"
# content = file("${path.module}/templates/argocd-apps.yaml")
# }
# resource "null_resource" "argocd_app_game" {
# provisioner "local-exec" {
# command = <<EOT
# aws eks update-kubeconfig --region ${local.region} --name ${local.cluster_name} ;
# kubectl apply -f ${local_file.argocd_app_game.filename}
# EOT
# }
# depends_on = [module.eks]