Files
modules/aws-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
2024-09-27 15:35:47 -04:00
..

display_name, description, icon, maintainer_github, verified, tags
display_name description icon maintainer_github verified tags
AWS Region A parameter with human region names and icons ../.icons/aws.svg coder true
helper
parameter
regions
aws

AWS Region

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

Customize the preselected parameter value:

module "aws-region" {
  source  = "registry.coder.com/modules/aws-region/coder"
  version = "1.0.12"
  default = "us-east-1"
}

provider "aws" {
  region = module.aws_region.value
}

AWS Regions

Examples

Customize regions

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

module "aws-region" {
  source  = "registry.coder.com/modules/aws-region/coder"
  version = "1.0.12"
  default = "ap-south-1"

  custom_names = {
    "ap-south-1" : "Awesome Mumbai!"
  }

  custom_icons = {
    "ap-south-1" : "/emojis/1f33a.png"
  }
}

provider "aws" {
  region = module.aws_region.value
}

AWS Custom

Exclude regions

Hide the Asia Pacific regions Seoul and Osaka:

module "aws-region" {
  source  = "registry.coder.com/modules/aws-region/coder"
  version = "1.0.12"
  exclude = ["ap-northeast-2", "ap-northeast-3"]
}

provider "aws" {
  region = module.aws_region.value
}

AWS Exclude

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