Lesson 1 of 4 · Azure with Terraform
Resource groups and providers
Azure resource groups organise related resources by lifecycle, ownership, and environment. Terraform’s azurerm provider manages Azure resources using the same configuration language and workflow you use for other providers.
Example
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "main" {
name = "rg-training"
location = "Southeast Asia"
}Step by step
- Configure the Azure provider.
- Create a resource group for one clear purpose.
- Use a consistent location.
- Name resources so ownership is visible.
Common mistakes to avoid
- Mixing unrelated production and training resources in one group.
- Using different locations without a reason.