chore: update metadata (#54)
This commit is contained in:
committed by
GitHub
parent
ab527c8ffd
commit
c3d8a9949c
@@ -11,38 +11,61 @@ tags: [gcp, regions, parameter, helper]
|
||||
|
||||
This module adds Google Cloud Platform regions to your Coder template.
|
||||
|
||||
```hcl
|
||||
module "gcp_region" {
|
||||
source = "https://registry.coder.com/modules/gcp-region"
|
||||
regions = ["us", "europe"]
|
||||
}
|
||||
|
||||
resource "google_compute_instance" "example" {
|
||||
zone = module.gcp_region.value
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Examples
|
||||
|
||||
1. Add only GPU zones in the US West 1 region:
|
||||
### Add only GPU zones in the US West 1 region
|
||||
|
||||
```hcl
|
||||
module "gcp_region" {
|
||||
source = "https://registry.coder.com/modules/gcp-region"
|
||||
default = ["us-west1-a"]
|
||||
regions = ["us-west1"]
|
||||
gpu_only = false
|
||||
}
|
||||
```
|
||||
```hcl
|
||||
module "gcp_region" {
|
||||
source = "https://registry.coder.com/modules/gcp-region"
|
||||
default = ["us-west1-a"]
|
||||
regions = ["us-west1"]
|
||||
gpu_only = false
|
||||
}
|
||||
|
||||
2. Add all zones in the Europe West region:
|
||||
resource "google_compute_instance" "example" {
|
||||
zone = module.gcp_region.value
|
||||
}
|
||||
```
|
||||
|
||||
```hcl
|
||||
module "gcp_region" {
|
||||
source = "https://registry.coder.com/modules/gcp-region"
|
||||
regions = ["europe-west"]
|
||||
single_zone_per_region = false
|
||||
}
|
||||
```
|
||||
### Add all zones in the Europe West region
|
||||
|
||||
3. Add a single zone from each region in US and Europe that laos has GPUs
|
||||
```hcl
|
||||
module "gcp_region" {
|
||||
source = "https://registry.coder.com/modules/gcp-region"
|
||||
regions = ["europe-west"]
|
||||
single_zone_per_region = false
|
||||
}
|
||||
|
||||
```hcl
|
||||
module "gcp_region" {
|
||||
source = "https://registry.coder.com/modules/gcp-region"
|
||||
regions = ["us", "europe"]
|
||||
gpu_only = true
|
||||
single_zone_per_region = true
|
||||
}
|
||||
```
|
||||
resource "google_compute_instance" "example" {
|
||||
zone = module.gcp_region.value
|
||||
}
|
||||
```
|
||||
|
||||
### Add a single zone from each region in US and Europe that laos has GPUs
|
||||
|
||||
```hcl
|
||||
module "gcp_region" {
|
||||
source = "https://registry.coder.com/modules/gcp-region"
|
||||
regions = ["us", "europe"]
|
||||
gpu_only = true
|
||||
single_zone_per_region = true
|
||||
}
|
||||
|
||||
resource "google_compute_instance" "example" {
|
||||
zone = module.gcp_region.value
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user