Files
modules/azure-region
2023-09-28 19:20:23 +00:00
..
2023-09-25 23:17:04 -05:00
2023-09-27 19:24:51 +00:00
2023-09-28 19:20:23 +00:00

display_name, description, icon, maintainer_github, verified, tags
display_name description icon maintainer_github verified tags
Azure Region A parameter with human region names and icons ../.icons/azure.svg coder true
helper
parameter
azure
regions

Azure Region

This module adds a parameter with all Azure regions, allowing developers to select the region closest to them.

module "azure_region" {
    source = "https://registry.coder.com/modules/azure-region"
    default = "eastus"
}

resource "azurem_resource_group" "example" {
    location = module.azure_region.value
}

Azure Region Default

Examples

Customize existing regions

Change the display name and icon for a region using the corresponding maps:

module "azure-region" {
    source = "https://registry.coder.com/modules/azure-region"
    custom_names = {
        "australia": "Go Australia!"
    }
    custom_icons = {
        "australia": "/icons/smiley.svg"
    }
}

resource "azurerm_resource_group" "example" {
    location = module.azure_region.value
}

Azure Region Custom

Exclude Regions

Hide all regions in Australia except australiacentral:

module "azure-region" {
    source = "https://registry.coder.com/modules/azure-region"
    exclude = [
        "australia",
        "australiacentral2",
        "australiaeast",
        "australiasoutheast"
    ]
}

resource "azurerm_resource_group" "example" {
    location = module.azure_region.value
}

Azure Exclude

For a complete Azure template, see the following examples in the Coder Registry.