Skip to content

Commit

Permalink
Delete hostname prior to cert destruction
Browse files Browse the repository at this point in the history
  • Loading branch information
benchiverton committed Jul 2, 2024
1 parent 24171a3 commit 2c68c48
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions terraform/instance/container_apps_bind_dns/scripts/destroy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ CERTIFICATE_ID=$(
--output tsv
)

# remove the custom domain from the container app
az containerapp hostname delete --hostname $CUSTOM_DOMAIN \
-g $CONTAINER_APP_RESOURCE_GROUP \
-n $CONTAINER_APP_NAME
echo "removed the custom domain from the container app"

# destroy the cert
az containerapp env certificate delete \
-g $CONTAINER_APP_ENV_RESOURCE_GROUP \
-n $CONTAINER_APP_ENV_NAME \
--certificate $CERTIFICATE_ID --yes
echo "destroyed the managed certificate"

# remove the custom domain from the container app
az containerapp hostname delete --hostname $CUSTOM_DOMAIN \
-g $CONTAINER_APP_RESOURCE_GROUP \
-n $CONTAINER_APP_NAME
echo "removed the custom domain from the container app"

0 comments on commit 2c68c48

Please sign in to comment.