This module adds Google Cloud Platform regions to your Coder template.
1module "gcp_region" { 2 source = "registry.coder.com/modules/gcp-region/coder" 3 version = "1.0.12" 4 regions = ["us", "europe"] 5} 6 7resource "google_compute_instance" "example" { 8 zone = module.gcp_region.value 9}
Note: setting gpu_only = true
and using a default region without GPU support, the default will be set to null
.
1module "gcp_region" { 2 source = "registry.coder.com/modules/gcp-region/coder" 3 version = "1.0.12" 4 default = ["us-west1-a"] 5 regions = ["us-west1"] 6 gpu_only = false 7} 8 9resource "google_compute_instance" "example" { 10 zone = module.gcp_region.value 11}
1module "gcp_region" { 2 source = "registry.coder.com/modules/gcp-region/coder" 3 version = "1.0.12" 4 regions = ["europe-west"] 5 single_zone_per_region = false 6} 7 8resource "google_compute_instance" "example" { 9 zone = module.gcp_region.value 10}
1module "gcp_region" { 2 source = "registry.coder.com/modules/gcp-region/coder" 3 version = "1.0.12" 4 regions = ["us", "europe"] 5 gpu_only = true 6 single_zone_per_region = true 7} 8 9resource "google_compute_instance" "example" { 10 zone = module.gcp_region.value 11}