From 86feb6475398ec7877202ebb337c2ea58a1bee1f Mon Sep 17 00:00:00 2001 From: Benjamin Chiverton Date: Tue, 2 Jul 2024 16:14:33 +0100 Subject: [PATCH] Reapply "Update destroy.sh" This reverts commit 054a7df8af42406dad28e704eb24555f64702324. --- .../instance/container_apps_bind_dns/scripts/destroy.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/terraform/instance/container_apps_bind_dns/scripts/destroy.sh b/terraform/instance/container_apps_bind_dns/scripts/destroy.sh index acd4b82..1c3d6ac 100644 --- a/terraform/instance/container_apps_bind_dns/scripts/destroy.sh +++ b/terraform/instance/container_apps_bind_dns/scripts/destroy.sh @@ -26,14 +26,13 @@ echo "removed the custom domain from the container app" # wait for the custom domain to be removed tries=0 until [ "$tries" -ge 12 ]; do - DOES_CUSTOM_DOMAIN_EXIST=$( + [[ -z $( 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 + ) ]] && break tries=$((tries + 1)) sleep 10