Create a resource group with Terraform in Azure

Happy New Year to all my blog readers, for many months I was busy with Azure Projects so unable to write any blog post. In mid of 2019, lately I have started working with Terraform. Once you have completed the Terraform installation you can verify it by running the below command.


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

az login

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 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

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

You can see below the Terraform is successfully initialized

Once it’s initialized you can just type terraform apply

Enter the confirmation to approve this settings.

This will create the resource group in Azure.

0.00 avg. rating (0% score) - 0 votes