Once you have completed the Terraform installation you can verify it by running the below command.
Terraform
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 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
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.
Leave a Reply