- Created VM , System assigned Identity using CLI
- Creating ResourceGR
- Create VM with system assigned ID az vm create \ --resource-group userRG \ --name userVM \ --image ubuntuLTS \ --generate-ssh-key \ --assign-identity \ --admin-username user \ --admin-password pass1234@ -----------------------------------------------------------------------------------------
- Created VM, User Assigned Identity using CLI
- Create ResourceRG (If you've not created before)
Create the User Identity to be assigned to the VM
az identity create --name bruno123 --resource-group saviourRGCreate VM the user Identity assigned
az vm create \
--resource-group userRG \
--name userVM --image ubuntuLTS \
--generate-ssh-key \
--assign-identity bruno123 \
--admin-username user \
--admin-password pass1234@
using variable to create KeyVault
myKeyVault=az204vault-$RANDOM
myLocation=
Creating Keyvault
az keyvault create --name $myKeyVault --resource-group az204-vault-rg --location $myLocation
Creating secretkey
az keyvault secret set --vault-name $myKeyVault --name "ExamplePassword" --value "hVFkk965BuUv"
To see check the secret
az keyvault secret show --name "ExamplePassword" --vault-name $myKeyVault
-
Delete Resource Groups Created (Cleaning UP)
az group delete --name
az group delete --name elodemoRG --no-wait
az group delete --name demokeyvault --no-wait
az group delete --name NetworkWatcherRG --no-wait
Top comments (0)