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 ```