Skip to content

Instantly share code, notes, and snippets.

@pkskelly
Last active October 20, 2020 12:28
Show Gist options
  • Save pkskelly/bb0e0c3545b40e7c682391981d5d3cf7 to your computer and use it in GitHub Desktop.
Save pkskelly/bb0e0c3545b40e7c682391981d5d3cf7 to your computer and use it in GitHub Desktop.
Script to update the SSL certificate for the URL Shortener (or any Azure Web App)
APP_NAME=""
RESOURCE_GROUP=""
CERT_FILE=""
CERT_PASSWORD=""
thumbprint=$(az webapp config ssl upload \
--name $APP_NAME \
--resource-group $RESOURCE_GROUP \
--certificate-file $CERT_FILE \
--certificate-password $CERT_PASSWORD \
--query thumbprint \
--output tsv)
az webapp config ssl bind \
--name $APP_NAME \
--resource-group $RESOURCE_GROUP \
--certificate-thumbprint $thumbprint \
--ssl-type SNI \
az functionapp config ssl bind --certificate-thumbprint $thumbprint \
--name passhorturl
--resource-group serverless-url-shortener-rg
--ssl-type SNI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment