File tree Expand file tree Collapse file tree 2 files changed +13
-33
lines changed Expand file tree Collapse file tree 2 files changed +13
-33
lines changed Original file line number Diff line number Diff line change 1- terraform {
2- required_version = " >= 1.4.0"
3- required_providers {
4- aws = {
5- source = " hashicorp/aws"
6- version = " ~> 5.0"
7- }
8- helm = {
9- source = " hashicorp/helm"
10- version = " ~> 2.12"
11- }
12- kubernetes = {
13- source = " hashicorp/kubernetes"
14- version = " ~> 2.25"
15- }
16- time = {
17- source = " hashicorp/time"
18- version = " ~> 0.9"
19- }
20- }
21- }
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ resource "helm_release" "argocd" {
2626 namespace = " argocd"
2727
2828 create_namespace = true
29- wait = true
29+ wait = true # Wait for ArgoCD pods to be ready
3030 timeout = 600
3131
3232 set {
@@ -42,17 +42,10 @@ resource "helm_release" "argocd" {
4242 depends_on = [module . eks ]
4343}
4444
45- # Wait for ArgoCD to be ready before creating applications
46- resource "null_resource" "wait_for_argocd" {
47- provisioner "local-exec" {
48- command = " kubectl wait --for=condition=Ready pod -l app.kubernetes.io/name=argocd-server -n argocd --timeout=300s"
49- }
50-
51- depends_on = [helm_release . argocd ]
52- }
53-
5445# Create ArgoCD Application automatically
5546resource "kubernetes_manifest" "solar_system_app" {
47+ provider = kubernetes- alpha
48+
5649 manifest = {
5750 apiVersion = " argoproj.io/v1alpha1"
5851 kind = " Application"
@@ -80,5 +73,13 @@ resource "kubernetes_manifest" "solar_system_app" {
8073 }
8174 }
8275
83- depends_on = [null_resource. wait_for_argocd ]
84- }
76+ wait_for {
77+ fields = {
78+ " status.health.status" = " Healthy"
79+ " status.sync.status" = " Synced"
80+ }
81+ }
82+
83+ depends_on = [helm_release . argocd ]
84+ }
85+
You can’t perform that action at this time.
0 commit comments