TemplatesModules
Back to Modules
Fly.io Region Icon

Fly.io Region

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

This module adds Fly.io regions to your Coder template. Regions can be whitelisted using the regions argument and given custom names and custom icons with their respective map arguments (custom_names, custom_icons).

We can use the simplest format here, only adding a default selection as the atl region.

1module "fly-region" {
2  source  = "registry.coder.com/modules/fly-region/coder"
3  version = "1.0.2"
4  default = "atl"
5}

Fly.io Default

Examples

Using region whitelist

The regions argument can be used to display only the desired regions in the Coder parameter.

1module "fly-region" {
2  source  = "registry.coder.com/modules/fly-region/coder"
3  version = "1.0.2"
4  default = "ams"
5  regions = ["ams", "arn", "atl"]
6}

Fly.io Filtered Regions

Using custom icons and names

Set custom icons and names with their respective maps.

1module "fly-region" {
2  source  = "registry.coder.com/modules/fly-region/coder"
3  version = "1.0.2"
4  default = "ams"
5
6  custom_icons = {
7    "ams" = "/emojis/1f90e.png"
8  }
9
10  custom_names = {
11    "ams" = "We love the Netherlands!"
12  }
13}

Fly.io custom icon and name

Associated template

Also see the Coder template registry for a Fly.io template that provisions workspaces as Fly.io machines.