From 7d529c7466d954514a0a68b9a9a600a6f7831dce Mon Sep 17 00:00:00 2001 From: Samyak Rout Date: Sun, 17 Nov 2024 21:59:45 +1100 Subject: [PATCH] Updated the changes to test the retries --- .github/workflows/manual: Generate-TF-Plan-Diagram.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/manual: Generate-TF-Plan-Diagram.yaml b/.github/workflows/manual: Generate-TF-Plan-Diagram.yaml index 547b665..966cb89 100644 --- a/.github/workflows/manual: Generate-TF-Plan-Diagram.yaml +++ b/.github/workflows/manual: Generate-TF-Plan-Diagram.yaml @@ -72,7 +72,10 @@ jobs: # Step 6: Terraform Plan (Run on all branches) - name: Terraform Plan run: | - terraform plan -input=false -lock=true -refresh=true -out /tmp/plan.out + while ! terraform plan -input=false -lock=true -refresh=true -out /tmp/plan.out; do + echo "State is locked. Retrying in 30 seconds..." + sleep 30 + done terraform show -json /tmp/plan.out > plan.json docker run --rm -it -p 9000:9000 -v /tmp/plan.json:/src/plan.json im2nguyen/rover:latest -planJSONPath=plan.json working-directory: infra_env_dashboard/infra-automation