Terraform module to create an Azure Resource Group.
Resource names should clearly indicate their type, workload, environment, and region. Using a consistent naming convention ensures clarity, uniformity, and easy identification across all repositories.
<resource_prefix>-<app_or_project>-<environment>-<region>-<optional_unique_suffix>
Component | Description | Example |
---|---|---|
resource_prefix |
Short abbreviation for the resource type. | rg (Resource Group) |
app_or_project |
Identifier for the application or project. | qoh |
environment |
Environment where the resource is deployed (prod , dev , test , etc.). |
prod |
region |
Azure region where the resource resides (e.g., cus for centralus ). |
cus |
optional_unique_suffix |
Optional unique string for ensuring name uniqueness, often random or incremental. | abcd , a42n |
Name | Version |
---|---|
terraform | >=0.13 |
azurerm | >=4.0.0 |
Name | Version |
---|---|
azurerm | >=4.0.0 |
No modules.
Name | Type |
---|---|
azurerm_resource_group.resource_group | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
location | (Required) The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. | string |
n/a | yes |
managed_by | (Optional) The ID of the resource or application that manages this Resource Group. | string |
null |
no |
name | (Required) The Name which should be used for this Resource Group. Changing this forces a new Resource Group to be created. | string |
n/a | yes |
tags | (Optional) A mapping of tags to assign to the resource. | map(any) |
{} |
no |
Name | Description |
---|---|
id | The ID of the Resource Group. |
location | The Location of the Resource Group. |
name | The Name of the Resource Group. |
tags | The Tags of the Resource Group. |