- A provider (for example, the AzureRM provider) is the communication layer between Terraform and a cloud platform such as Azure.
- Providers implement many resource types (virtual networks, storage accounts, SQL databases, Kubernetes clusters, etc.).
- Each resource type documents its available arguments (some required, some optional) in the Terraform provider docs: https://registry.terraform.io/.

- Each resource block is syntactically independent, but Terraform reads them together and constructs a plan.
- By referencing
azurerm_resource_group.rg.nameandazurerm_resource_group.rg.locationyou avoid duplicating literal values and let Terraform infer implicit dependencies (e.g., the resource group is created before resources that reference it).
resource_group_name and location in each resource. This works functionally but increases maintenance overhead:
Storage account names and other cloud resource names must follow provider-specific rules (for example, storage account names in Azure must be 3–24 characters, lowercase letters and numbers, and globally unique). These are Azure rules, not Terraform rules.
terraform plancompares the declared desired state with the current state, showing what will be added, changed, or destroyed.terraform applyexecutes the plan and streams provisioning progress.
terraform plan output:
terraform apply --auto-approve output:

Further reading and references
- Terraform Provider documentation: https://registry.terraform.io/
- Azure Portal: https://portal.azure.com/