Sample code for Azure ResourceModules (https://github.com/Azure/ResourceModules)
$ mkdir ~/bicep-resource-modules
$ cd ~/bicep-resource-modules
$ git clone [email protected]:katakura/bicep-resource-modules-sample.git
$ az logout
$ az account clear
$ az login
$ az account set -s <your subscription id>
$ cd ~/bicep-resource-modules-sample
$ az deployment sub create -l japaneast --template-file main.bicep --parameters resourceGroupName=<target resource group name> adminPassword=<password>
$ az resource list -g 20220105-test-rg -o table
Name ResourceGroup Location Type Status
-------------------- ---------------- ---------- --------------------------------------- --------
testvm-nsg 20220105-test-rg japaneast Microsoft.Network/networkSecurityGroups
testvm-vnet 20220105-test-rg japaneast Microsoft.Network/virtualNetworks
testvm-vm-pip01 20220105-test-rg japaneast Microsoft.Network/publicIPAddresses
testvm-vm-nic01 20220105-test-rg japaneast Microsoft.Network/networkInterfaces
testvm-vm 20220105-test-rg japaneast Microsoft.Compute/virtualMachines
testvm-vm-disk-os-01 20220105-TEST-RG japaneast Microsoft.Compute/disks
$ az network public-ip show -g 20220105-test-rg -n testvm-vm-pip01 --query 'ipAddress' -o tsv
40.115.192.xx
$ ssh [email protected]
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.11.0-1022-azure x86_64)
(snip)
azureuser@testvm-vm:~$