Created
December 14, 2019 02:21
-
-
Save xximjasonxx/be57b5676129a71ffd0dd42eb04094b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export subId=$(az account show --query id -o tsv) | |
export appName=$(echo "$(terraformPath.appservice_path)" | sed 's/^https:\/\/\(.*\).azurewebsites.net$/\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