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
Stephen Kirby 2c94c82cbf
chore: allowed empty default for modules (#72)
From #66, also added testing for `jetbrains-gateway`.

## Regions
Azure and AWS were simple, but there is no error message when no region is selected:

https://github.com/coder/modules/assets/58410745/9a9e317b-7764-427f-b298-86313de5fb33

Open to feedback on this.

## Jetbrains Gateway
The Jetbrains gateway default IDE satisfies a ton of logic in the template, so allowing `null` would lead to a lot of patchwork `try` statements. Now it's implemented to use the first IDE in the `jetbrains_ides` as the coder_parameter default for cleanliness. 

Let me know your thoughts.
2 years ago
..
README.md added AWS screenshots 2 years ago
main.test.ts chore: allowed empty default for modules (#72) 2 years ago
main.tf chore: allowed empty default for modules (#72) 2 years ago

README.md

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 = "https://registry.coder.com/modules/aws-region"
    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 = "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

Exclude regions

Hide the Asia Pacific regions Seoul and Osaka:

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

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