Create a resource group with Terraform in Azure

superior_hosting_service

Terraform

Once you have completed the Terraform installation you can verify it by running the below command.

Terraform

terra

Once you verify the Terraform installation.You can use the Azure CLI to login to Azure Bash shell as shown below.

az login

az

In the next step you can select the subscription

az account set –subscription “Visual Studio Enterprise”

In next step create an empty folder called rg and save the rg.tf file in that folder. I have used visual studio code as a text editor for writing all my Terraform Code. You need to download terraform extension in VS Code. e

rg

In the next step type the terraform init, to initialize the Terraform.

init

You can see below the Terraform is successfully initialized

vers

Once it’s initialized you can just type terraform apply

apply

Enter the confirmation to approve this settings.

value

This will create the resource group in Azure.