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}
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}
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}
For a complete AWS EC2 template, see the following examples in the Coder Registry.