Files
modules/azure-region
Stephen Kirby 2c94c82cbf chore: allowed empty default for modules (#72)
From #66, also added testing for `jetbrains-gateway`.

## Regions
Azure and AWS were simple, but there is no error message when no region is selected:

https://github.com/coder/modules/assets/58410745/9a9e317b-7764-427f-b298-86313de5fb33

Open to feedback on this.

## Jetbrains Gateway
The Jetbrains gateway default IDE satisfies a ton of logic in the template, so allowing `null` would lead to a lot of patchwork `try` statements. Now it's implemented to use the first IDE in the `jetbrains_ides` as the coder_parameter default for cleanliness. 

Let me know your thoughts.
2023-10-03 10:05:47 +03: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.