Azure CLI and Powershell
- Lets try to create azure network resources using Commandline
- Azure has two popular commandline supports
- Azure CLI
- Azure Powershell
- Then lets look at configuring our developer environment
- Install Azure CLI Extension in Visual Studio Code
- If you are using Azure Powershell install Powershell extension
- Install Azure CLI Extension in Visual Studio Code
- For any reason if azure cli/powershell is not working on your system
- Launch Cloud Shell
- Launch Cloud Shell
Azure CLI
- Azure Cli when install on your system will have an executable
az - Azure CLI commands will be in the form of
az <resource/service> <action> [<arguments>] - Ensure you execute
az login(on your system not required in cloud shell) - For all azure CLI command Refer Here
- For vnet sub commands Refer Here
- Refer Here for the cli commands used to create a vnet
- Refer Here to find the cli documentation for the nsg.
- Exercise: Create a nsg which opens 22,80 and 443 port from anywhere (inbound)
- Refer Here for the solution
- Exercise: Create a nsg which denies all the communication from data subnet and attach it to the web subnet.
