Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
export subId=$(az account show --query id -o tsv)
export appName=$(echo "$(terraformPath.appservice_path)" | sed 's/^https:\/\/\(.*\)$/\1/')
export resId="/subscriptions/$subId/resourceGroups/<your resource group name>/providers/Microsoft.Web/sites/$appName"
export masterKey=$(az rest --method post --uri "$resId/host/default/listKeys?api-version=2018-11-01" | jq -r '.masterKey')
echo "##vso[task.setvariable variable=funcAppMasterKey;isOutput=true]$masterKey"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment