@@ -6,20 +6,20 @@ printf "\n1. Creating a new resource group: %s and location: %s.\n" "$groupName"
6
6
az resource group create -n " $groupName " --location " $location "
7
7
8
8
printf " \n2. Creating a new storage account '%s' in type '%s'.\n" " $storageAccountName " " $storageAccountType "
9
- az storage account create--resourcegroupname " $groupName " --name " $storageAccountName " --location " $location " --type " $storageAccountType "
9
+ az storage account create --resourcegroupname " $groupName " --name " $storageAccountName " --location " $location " --type " $storageAccountType "
10
10
11
11
printf " \n3. Create virtual network.\n"
12
- result=` az vnet create--resourcegroupname " $groupName " --name test --location " $location " --addressprefix " [\" 10.0.0.0/16\" ]" --subnet " [{\" Name\" :\" test\" ,\" AddressPrefix\" :\" 10.0.0.0/24\" }]" --force`
12
+ result=` az vnet create --resourcegroupname " $groupName " --name test --location " $location " --addressprefix " [\" 10.0.0.0/16\" ]" --subnet " [{\" Name\" :\" test\" ,\" AddressPrefix\" :\" 10.0.0.0/24\" }]" --force`
13
13
14
14
contextResult=` az context ls`
15
15
16
16
subId=` echo $contextResult | jq ' .Subscription.SubscriptionId' --raw-output`
17
17
18
18
subnetId=" /subscriptions/$subId /resourceGroups/$groupName /providers/Microsoft.Network/virtualNetworks/test/subnets/test"
19
19
20
- printf " \n4. Create network interface with:\r\nsubId='%s' \r\n& \r\nsubnetId ='$subnetId '.\n" " $subId "
20
+ printf " \n4. Create network interface with:\r\nsubId='%s' \r\n& \r\nsubnet ='$subnetId '.\n" " $subId "
21
21
export MSYS_NO_PATHCONV=1
22
- az vnet create--name test --resourcegroupname " $groupName " --location " $location " --subnetid " $subnetId "
22
+ az network interface create --name test --resourcegroupname " $groupName " --location " $location " --subnetId " $subnetId "
23
23
export MSYS_NO_PATHCONV=
24
24
25
25
nicId=" /subscriptions/$subId /resourceGroups/$groupName /providers/Microsoft.Network/networkInterfaces/test"
@@ -28,9 +28,8 @@ vhdUri="https://$storageAccountName.blob.core.windows.net/$storageAccountName/$s
28
28
29
29
vmStr=" {\" Name\" :\" test\" ,\" HardwareProfile\" :{\" VmSize\" :\" Standard_A1\" },\" NetworkProfile\" :{\" NetworkInterfaces\" :[{\" Id\" :\" $nicId \" }]},\" OSProfile\" :{\" ComputerName\" :\" test\" ,\" AdminPassword\" :\" BaR@1234\" ,\" AdminUsername\" :\" Foo12\" },\" StorageProfile\" :{\" ImageReference\" :{\" Offer\" :\" WindowsServer\" ,\" Publisher\" :\" MicrosoftWindowsServer\" ,\" Sku\" :\" 2008-R2-SP1\" ,\" Version\" :\" latest\" },\" OSDisk\" :{\" Caching\" :\" ReadWrite\" ,\" CreateOption\" :\" FromImage\" ,\" Name\" :\" osDisk\" ,\" Vhd\" :{\" Uri\" :\" $vhdUri \" }}}}"
30
30
31
- printf " \n5. Create virtual machine with\r\nnicId='%s'\r\nvhdUri='%s'\r\nvmStr='%s'\n" " $nicId " " $vhdUri " " $vmStr "
32
-
33
- az vm create--resourcegroupname " $groupName " --location " $location " --vmprofile " $vmStr "
31
+ printf " \n5. Create virtual machine with\r\nnicId='%s'\r\nvhdUri='$vhdUri '\r\nvmStr='$vmStr '\n" " $nicId "
32
+ az vm create --resourcegroupname " $groupName " --location " $location " --vmprofile " $vmStr "
34
33
35
34
printf " \n6. Removing resource group: %s.\n" " $groupName "
36
35
az resource group rm -n " $groupName " -f
0 commit comments