From 86281742daa01d9ad05033c7804b94855c6e2465 Mon Sep 17 00:00:00 2001 From: Slawek Koszewski Date: Fri, 15 Aug 2025 21:34:26 +0200 Subject: [PATCH] Updated certificate binding instructions. --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 05ce178..b6bd6d2 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,9 @@ You have to be authenticated in Azure CLI. The app will block terminal and start ## Add Certificate Binding ```shell -az containerapp hostname bind \ - --hostname $DOMAIN_NAME \ - -g $RESOURCE_GROUP \ - -n $CONTAINER_APP \ - --environment $ENVIRONMENT \ - --certificate $CERTIFICATE_LOWERCASE_NAME \ - --validation-method CNAME +# Find the certificate name +CERTIFICATE_LOWERCASE_NAME=$(az containerapp env certificate list -g $RESOURCE_GROUP -n $ENVIRONMENT --query '[].name' -o tsv) + +# Bind the certificate to the container app +az containerapp hostname bind --hostname $DOMAIN_NAME -g $RESOURCE_GROUP -n $CONTAINER_APP --environment $ENVIRONMENT --certificate $CERTIFICATE_LOWERCASE_NAME --validation-method CNAME ```