Skip to content

Instantly share code, notes, and snippets.

@mcnemesis
Last active January 31, 2019 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcnemesis/c4a3561a6e66f30b5c48591ca3a52f97 to your computer and use it in GitHub Desktop.
Save mcnemesis/c4a3561a6e66f30b5c48591ca3a52f97 to your computer and use it in GitHub Desktop.
# CONSIDER THIS AN EXAMPLE ... replace variables with own vals
az account set -s <SUBSCRIPTION_ID>
az vm deallocate --resource-group TWEBBUILDER --name TWEBBUILDERVM
az vm list -g TWEBBUILDER --query '[].{Name:name,DiskName:storageProfile.osDisk.name}' --output table
az disk create -g TWEBBUILDER_GALL --name TWEBBUILDER_GALL_disk --source /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/TWEBBUILDER/providers/Microsoft.Compute/snapshots/TWBSnap
az disk list -g TWEBBUILDER_GALL --output table
az network vnet create -g TWEBBUILDER_GALL --location westeurope --name TWBGALLVNet --address-prefix 192.168.0.0/16 --subnet-name TWBGALLSubNet --subnet-prefix 192.168.1.0/24
az network public-ip create -g TWEBBUILDER_GALL --location westeurope --name TWBGALLIP --dns-name twbgallery --allocation-method static --idle-timeout 4
az network nic create -g TWEBBUILDER_GALL --location westeurope --name TWBGallNic --vnet-name TWBGALLVNet --subnet TWBGALLSubNet --public-ip-address TWBGALLIP
az vm create -g TWEBBUILDER_GALL --name TWBGALLERYVM --nics TWBGallNic --size Standard_DS1_v2 --os-type Linux --attach-os-disk TWEBBUILDER_GALL_disk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment