DEV Community

Blessing Ndubuisi
Blessing Ndubuisi

Posted on

2

AZURE CLI (MANAGING AZURE RESOURCES)

Prerequisites:

  • Azure subscription
  • Azure CLI installed on your machine
  • Basic knowledge of Azure resources and CLI commands

Azure Cli is a tool for creating and managing Azure resources, its all text base with no graphical interface. It saves you alot of time, you can use a single command to manage a resource.
TO INSTALL AZURE CLI ON WINDOW
go to https://aka.ms/installazurecliwindows and download the installer, run the downloaded installer and follow the prompts. , click next, next and install. sign in with cli and login into Azure Cli.

USING AZURE CLI WITH CLOUDSHELL
Log in to shell.azure.com it will take you through the login process and you will get to the screen here
Image description
you will have to choose Bash or powershell as your shell environment. first for it to work you will have to attach a storage account. i created my storage which it successfully sync to the cloud shell.
Image description
why the storage account ? because it has to store all the data and files you might upload. once cloudshell is launched you can use Azure cli, to create, manage and delete Azure resources.
COMMON AZURE CLI COMMANDS
az command list it lists all the accounts available to this login.

az group create
, az vm create, command like az vm --help this gives you all the commands availablein the az vm.
Image description

EXERCISES

Exercise 1: Create a Resource Group

  1. Open Azure CLI and login to your Azure account using az login.

  2. Create a new resource group using az group create --name <resource_group_name> --location <location>, this time through cloud shell.
    Image description

  3. Verify the resource group creation using az group show --name <resource_group_name>. note the second group was created throgh cloud shell.

Image description

So this is basically how Azure Cli works. you can use it to manage resources such as virtual machines,storage accounts and resource groups.

AWS Q Developer image

Your AI Code Assistant

Implement features, document your code, or refactor your projects.
Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay