This module provides an output of all Azure regions and availability zones.
The module outputs a list of objects with the following attributes:
name
- The name of the region. E.g. "eastus"display_name
- The display name of the region. E.g. "East US".paired_region_name
- The name of the region paired with this region. May benull
if the region has no pair.geography
- The geography of the region.geography_group
- The geography group of the region.zones
- A list of the availability zones in the region. Will benull
if the region does not support zones.
This data is the further composed into useful maps keyed by region name and region display name.
module "regions" {
source = "Azure/regions/azurerm"
}
output "regions" {
value = module.regions.regions
}
Based off the work of matt-FFFFFF and his version found here
Name | Version |
---|---|
terraform | >= 1.9.0 |
azapi | >= 1.9.0 |
azurerm | >= 3.74.0 |
Name | Version |
---|---|
azapi | >= 1.9.0 |
azurerm | >= 3.74.0 |
No modules.
Name | Type |
---|---|
azapi_resource_action.compute_provider | data source |
azapi_resource_action.locations | data source |
azurerm_client_config.current | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
availability_zones_required | If true, will only include regions that have availability zones. If false, will include all regions, regardless of whether they have availability zones. The default is false. |
bool |
false |
no |
geography | The code for the geography to filter by. For example, "United Kingdom" or "United States". | string |
null |
no |
geography_group | The code for the geography group to filter by. For example, "US" or "Europe". | string |
null |
no |
include_only_recommended_regions | If true, will only include regions that are recommended for new resources. If false, will include all regions, regardless of whether they are recommended for new resources. The default is false. The 'recommended' attribute is a qualitiative determined by Microsoft. |
bool |
false |
no |
Name | Description |
---|---|
all_region_names | A list of all region names. |
regions | A list of region objects. Each region object contains the following attributes: - name - The name of the region.- display_name - The display name of the region.- paired_region_name - The name of the region paired with this region. May be null if the region has no pair.- geography - The geography of the region.- geography_group - The geography group of the region.- zones - A list of the availability zones in the region. Will be empty if the region does not support zones. |
regions_by_display_name | A map of region display names to region objects. See regions output for more details. |
regions_by_geography | A map of geographies to a list of region objects. See regions output for more details. |
regions_by_geography_group | A map of geography groups to a list of region objects. See regions output for more details. |
regions_by_name | A map of region display names to region objects. See regions output for more details. |
regions_by_name_or_display_name | A map of regions by either display names or name, to region objects. See regions output for more details. |
supported_geographies | Supported geographies. |
supported_geography_groups | Supported geography groups. |