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.
modules/aws-region/README.md

78 lines
1.6 KiB
Markdown

---
display_name: AWS Region
description: A parameter with human region names and icons
icon: ../.icons/aws.svg
maintainer_github: coder
verified: true
tags: [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:
```hcl
module "aws-region" {
source = "https://registry.coder.com/modules/aws-region"
default = "us-east-1"
}
provider "aws" {
region = module.aws_region.value
}
```
![AWS Regions](../.images/aws-regions.png)
## Examples
### Customize regions
Change the display name and icon for a region using the corresponding maps:
```hcl
module "aws-region" {
source = "https://registry.coder.com/modules/aws-region"
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](../.images/aws-custom.png)
### Exclude regions
Hide the Asia Pacific regions Seoul and Osaka:
```hcl
module "aws-region" {
source = "https://registry.coder.com/modules/aws-region"
exclude = [ "ap-northeast-2", "ap-northeast-3" ]
}
provider "aws" {
region = module.aws_region.value
}
```
![AWS Exclude](../.images/aws-exclude.png)
## Related templates
For a complete AWS EC2 template, see the following examples in the [Coder Registry](https://registry.coder.com/).
- [AWS EC2 (Linux)](https://registry.coder.com/templates/aws-linux)
- [AWS EC2 (Windows)](https://registry.coder.com/templates/aws-windows)