Delete Resources In Azure Using Terraform
When you don’t need the resources which you created using the terraform you can clear them.
Step 1: Open a terminal either Linux Terminal or PowerShell in windows operating system and remember to be in this folder where you created the terraform configuration files.
Step 2: Create a terraform execution plan to delete the resources by using the destroy flag.
Syntax
terraform plan -destroy -out main.destroy.tfplan
Output
Step 3: Now execute that execution plan to destroy all the resources.
Syntax
terraform apply main.destroy.tfplan
Output
How to Create Windows VM in Azure Using Terraform
In this article, we will cover the whole process of creating Windows VM in Azure using Terraform. When you have to create multiple VMs, perhaps even identical ones, or machines with nearly identical configurations, it can be repetitive and time-consuming to go through the manual setup process each time. That’s where Terraform comes in. Think of it as a blueprint for building VMs without the need for manual work, reducing errors and saving you valuable time. Let’s first see what virtual machines, azure, and Terraform are.