Created
December 18, 2021 15:20
-
-
Save pascals-msft/e2b0b5224ae002bcc0c6be4f106f65af 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
# demo: new linux VM in Azure | |
# you need az and a SSH key in ~/.ssh | |
demo=demo$RANDOM | |
rgname=${demo}rg | |
vmname=${demo}vm | |
location=westeurope | |
az group create -l $location -n $rgname -o yamlc | |
az vm create --image UbuntuLTS -g $rgname -n $vmname -o yamlc | |
pip=$(az vm show -g $rgname -n $vmname -d --query publicIps -o tsv) | |
ssh $pip | |
# delete everything | |
az group delete -g $rgname -y --no-wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment