TemplatesModules
Back to Modules
AWS Region Icon

AWS Region

By:
A parameter with human region names and icons
README
Variables (8)
Parameters (1)
Source

A parameter with all AWS regions. This allows developers to select the region closest to them.

Customize the preselected parameter value:

1module "aws-region" {
2  source  = "registry.coder.com/modules/aws-region/coder"
3  version = "1.0.12"
4  default = "us-east-1"
5}
6
7provider "aws" {
8  region = module.aws_region.value
9}

AWS Regions

Examples

Customize regions

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

1module "aws-region" {
2  source  = "registry.coder.com/modules/aws-region/coder"
3  version = "1.0.12"
4  default = "ap-south-1"
5
6  custom_names = {
7    "ap-south-1" : "Awesome Mumbai!"
8  }
9
10  custom_icons = {
11    "ap-south-1" : "/emojis/1f33a.png"
12  }
13}
14
15provider "aws" {
16  region = module.aws_region.value
17}

AWS Custom

Exclude regions

Hide the Asia Pacific regions Seoul and Osaka:

1module "aws-region" {
2  source  = "registry.coder.com/modules/aws-region/coder"
3  version = "1.0.12"
4  exclude = ["ap-northeast-2", "ap-northeast-3"]
5}
6
7provider "aws" {
8  region = module.aws_region.value
9}

AWS Exclude

Related templates

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