You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
modules/azure-region
Michael Smith 438c904567
chore: cleanup all test files (#293)
## Changes made
- Removed all unused imports, and made sure type imports were labeled
correctly
- Updated all comparisons to be more strict
- Simplified loops to remove unneeded closure functions
- Removed all explicit `any` types
- Updated how strings were defined to follow general TypeScript best
practices

## Notes
- We definitely want some kind of linting setup for this repo. I'm going
to bring this up when Blueberry has its next team meeting next week
10 months ago
..
README.md chore: bump version to 1.0.12 in README.md files (#230) 1 year ago
main.test.ts chore: cleanup all test files (#293) 10 months ago
main.tf feat: add coder_parameter_order to all data.coder_parameter fields (#223) 1 year ago

README.md

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  = "registry.coder.com/modules/azure-region/coder"
  version = "1.0.12"
  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  = "registry.coder.com/modules/azure-region/coder"
  version = "1.0.12"
  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  = "registry.coder.com/modules/azure-region/coder"
  version = "1.0.12"
  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.