Last active
December 19, 2018 22:03
-
-
Save dfinke/91b36a39f001812a5ca023d4a1d5ccf1 to your computer and use it in GitHub Desktop.
How do you translate these `az cli` calls into the PowerShell Az Module?
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
az login --service-principal --username "${SERVICE_PRINCIPAL}" --password "${SERVICE_PASS}" --tenant "${TENANT_ID}" | |
echo "Creating resource group ${APPID}-group" | |
az group create -n ${APPID}-group -l eastus | |
echo "Creating app service plan ${APPID}-plan" | |
az appservice plan create -g ${APPID}-group -n ${APPID}-plan --sku FREE | |
echo "Creating webapp ${APPID}" | |
az webapp create -g ${APPID}-group -p ${APPID}-plan -n ${APPID} --deployment-local-git | |
echo "Getting username/password for deployment" | |
DEPLOYUSER=`az webapp deployment list-publishing-profiles -n ${APPID} -g ${APPID}-group --query '[0].userName' -o tsv` | |
DEPLOYPASS=`az webapp deployment list-publishing-profiles -n ${APPID} -g ${APPID}-group --query '[0].userPWD' -o tsv` | |
git remote add azure https://${DEPLOYUSER}:${DEPLOYPASS}@${APPID}.scm.azurewebsites.net/${APPID}.git | |
git push azure master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment