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.
82 lines
1.8 KiB
Markdown
82 lines
1.8 KiB
Markdown
---
|
|
display_name: Azure Region
|
|
description: A parameter with human region names and icons
|
|
icon: ../.icons/azure.svg
|
|
maintainer_github: coder
|
|
verified: true
|
|
tags: [helper, parameter, azure, regions]
|
|
---
|
|
|
|
# Azure Region
|
|
|
|
This module adds a parameter with all Azure regions, allowing developers to select the region closest to them.
|
|
|
|
```tf
|
|
module "azure_region" {
|
|
source = "registry.coder.com/modules/azure-region/coder"
|
|
version = "1.0.0"
|
|
default = "eastus"
|
|
}
|
|
|
|
resource "azurem_resource_group" "example" {
|
|
location = module.azure_region.value
|
|
}
|
|
```
|
|
|
|

|
|
|
|
## Examples
|
|
|
|
### Customize existing regions
|
|
|
|
Change the display name and icon for a region using the corresponding maps:
|
|
|
|
```tf
|
|
module "azure-region" {
|
|
source = "registry.coder.com/modules/azure-region/coder"
|
|
version = "1.0.0"
|
|
custom_names = {
|
|
"australia" : "Go Australia!"
|
|
}
|
|
custom_icons = {
|
|
"australia" : "/icons/smiley.svg"
|
|
}
|
|
}
|
|
|
|
resource "azurerm_resource_group" "example" {
|
|
location = module.azure_region.value
|
|
}
|
|
```
|
|
|
|

|
|
|
|
### Exclude Regions
|
|
|
|
Hide all regions in Australia except australiacentral:
|
|
|
|
```tf
|
|
module "azure-region" {
|
|
source = "registry.coder.com/modules/azure-region/coder"
|
|
version = "1.0.0"
|
|
exclude = [
|
|
"australia",
|
|
"australiacentral2",
|
|
"australiaeast",
|
|
"australiasoutheast"
|
|
]
|
|
}
|
|
|
|
resource "azurerm_resource_group" "example" {
|
|
location = module.azure_region.value
|
|
}
|
|
```
|
|
|
|

|
|
|
|
## Related templates
|
|
|
|
For a complete Azure template, see the following examples in the [Coder Registry](https://registry.coder.com/).
|
|
|
|
- [Azure VM (Linux)](https://registry.coder.com/templates/azure-linux)
|
|
- [Azure VM (Windows)](https://registry.coder.com/templates/azure-windows)
|