Skip to content

Commit

Permalink
Update destroy.sh (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
benchiverton authored Jul 2, 2024
1 parent a2025a8 commit a18d264
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions terraform/instance/container_apps_bind_dns/scripts/destroy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ echo "removed the custom domain from the container app"

# wait for the custom domain to be removed
tries=0
until [ "$tries" -ge 20 ]; do
until [ "$tries" -ge 12 ]; do
DOES_CUSTOM_DOMAIN_EXIST=$(
az containerapp hostname list \
-n $CONTAINER_APP_NAME \
-g $CONTAINER_APP_RESOURCE_GROUP \
--query "[?name=='$CUSTOM_DOMAIN'].name" \
--output tsv
)
[[ ! -z "${$DOES_CUSTOM_DOMAIN_EXIST}" ]] && break
[[ -z "${$DOES_CUSTOM_DOMAIN_EXIST}" ]] && break
tries=$((tries + 1))

sleep 15
sleep 10
done
if [ "$tries" -ge 20 ]; then
die "waited for 5 minutes, checked the containerapp 20 times and it still has the custom domain. check azure portal..."
if [ "$tries" -ge 12 ]; then
die "waited for 2 minutes, checked the containerapp 12 times and it still has the custom domain. check azure portal..."
fi

# destroy the cert
Expand Down

0 comments on commit a18d264

Please sign in to comment.