File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ resource "time_sleep" "wait_for_argocd" {
5252resource "null_resource" "solar_system_app" {
5353 provisioner "local-exec" {
5454 command = << EOF
55+ # Configure kubectl to use EKS cluster
56+ aws eks update-kubeconfig --name ${ module . eks . cluster_name } --region us-east-1
57+
5558# Wait for ArgoCD CRDs to be available
5659kubectl wait --for condition=established --timeout=300s crd/applications.argoproj.io
5760
8386
8487 provisioner "local-exec" {
8588 when = destroy
86- command = " kubectl delete application solar-system -n argocd --ignore-not-found=true"
89+ command = << EOF
90+ # Configure kubectl for destroy
91+ aws eks update-kubeconfig --name ${ module . eks . cluster_name } --region us-east-1 || true
92+ kubectl delete application solar-system -n argocd --ignore-not-found=true
93+ EOF
8794 }
8895
8996 depends_on = [time_sleep . wait_for_argocd ]
You can’t perform that action at this time.
0 commit comments