File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,6 +109,24 @@ jobs:
109109
110110 az account set --subscription ${{ vars.AZURE_SUBSCRIPTION_ID }}
111111
112+ # Wait for resource group deletion to complete if in progress
113+ echo "Checking resource group status..."
114+ for i in {1..30}; do
115+ RG_STATE=$(az group show --name "$RESOURCE_GROUP" --query "properties.provisioningState" -o tsv 2>/dev/null || echo "NotFound")
116+
117+ if [ "$RG_STATE" = "NotFound" ]; then
118+ echo "Resource group fully deleted. Recreating..."
119+ az group create --name "$RESOURCE_GROUP" --location ${{ vars.AZURE_LOCATION }}
120+ break
121+ elif [ "$RG_STATE" = "Succeeded" ]; then
122+ echo "Resource group ready"
123+ break
124+ else
125+ echo "Resource group in state: $RG_STATE. Waiting 10s... (attempt $i/30)"
126+ sleep 10
127+ fi
128+ done
129+
112130 # Retry provision (will skip completed resources)
113131 azd provision --no-prompt
114132 timeout-minutes : 60
You can’t perform that action at this time.
0 commit comments