This tutorial will show you on how to create a Azure Resource Group by using the popular Terraform tool.
What is Terraform?
For those who may not be familiar with Terraform, it is a method that modifies the configuration of cloud resources. The tools are stuff that you like, such as providing Resource group on Azure Cloud, AWS Cloud, Google Cloud, etc. In order to explain our desired infrastructure, Terraform Scripts themselves use a declarative human readable. The Terraform method is used to incorporate the changes in the script. This whole process is called infrastructure as code (#IaC), with scripts managed by git or by another version source code system.
- Azure Account( https://azure.microsoft.com/en-us/features/azure-portal/)
- Install Azure CLI ( https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
- Azure Login ( az login)
- Terraform ( v 12 )
1. Create a base Terraform configuration file
2. Initializing Terraform
3. Creating Terraform Plan
4. Terraform Apply / Run
5. Azure Portal : Resource Group
Recap / Summary
We had learned how to use Terraform to provision Azure Resource Group by following steps;
- Create Terraform Configuration file(provider.tf)
- Set our Terraform Plan
- To run our Terraform Plan we can apply terraform apply
- We have Azure Resource Group automatically via Teraaform.
Next, you can explore many Azure resource provision with Terraform such to provision Azure App Service, Azure VM, Azure Function and etc.