This terraform module provides a way to get a meaningful abbreviated version for a region in Azure. For example, "eastus2" becomes "eus2". This module also always outputs a map for every region, which allows you to do multiple at once.
This module does not communicate with Azure in any way.
Basic usage of this module is as follows:
module "utils" {
source = "terraform-azure-region-abbreviator/utils/azure"
version = "~> 0.3"
region = "eastus2"
}
locals {
"eastus2" = module.utils.region_short_name
}
The above results in locals with computed values of:
locals {
"eastus2" = "eus2"
}
Functional examples are included in the examples directory.
Name | Description | Type | Default | Required |
---|---|---|---|---|
region | The Azure region to retrieve a short name for (ex. eastus2 ). |
string |
null |
no |
Name | Description |
---|---|
region_short_name | The three to four character shortname of the region specified in var.region. |
region_short_name_map | The three to four character shortname of any given region. |
These sections describe requirements for using this module.
The following dependencies must be available:
- [Terraform][terraform] >= v0.12, < v0.14
An Azure RBAC is not needed for to use this module.
Projects/APIs are not required to use this module.
Refer to the contribution guidelines for information on contributing to this module.