refactor README

pull/54/head
Muhammad Atif Ali 2 years ago
parent eaed4eb8da
commit d043d31d29
No known key found for this signature in database

@ -14,10 +14,6 @@ the region closest to them.
![AWS Regions](../.images/aws-region.png)
## Examples
### Default Region
Customize the preselected parameter value:
```hcl
@ -31,6 +27,8 @@ provider "aws" {
}
```
## Examples
### Customize Regions
Change the display name and icon for a region:

@ -11,10 +11,6 @@ tags: [helper, parameter, azure, regions]
This module adds a parameter with all Azure regions, allowing developers to select the region closest to them.
## Examples
### Default region
```hcl
module "azure_region" {
source = "https://registry.coder.com/modules/azure-region"
@ -26,6 +22,8 @@ resource "azurem_resource_group" "example" {
}
```
## Examples
### Customize existing regions
Change the display name for a region:

@ -11,10 +11,6 @@ tags: [helper, parameter, fly.io, regions]
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`).
## Examples
### Using default settings
We can use the simplest format here, only adding a default selection as the `atl` region.
```hcl
@ -26,6 +22,8 @@ module "fly-region" {
![Fly.io Default](../.images/flyio-basic.png)
## Examples
### Using region whitelist
The regions argument can be used to display only the desired regions in the Coder parameter.

@ -11,38 +11,45 @@ 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"]
}
```
![GCP Regions](../.images/gcp-regions.png)
## Examples
1. 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
}
```
2. Add all zones in the Europe West region:
```hcl
module "gcp_region" {
source = "https://registry.coder.com/modules/gcp-region"
regions = ["europe-west"]
single_zone_per_region = false
}
```
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 = ["us", "europe"]
gpu_only = true
single_zone_per_region = true
}
```
### 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
}
```
### Add all zones in the Europe West region
```hcl
module "gcp_region" {
source = "https://registry.coder.com/modules/gcp-region"
regions = ["europe-west"]
single_zone_per_region = false
}
```
### 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
}
```

@ -12,12 +12,6 @@ tags: [integration]
Install the JF CLI and authenticate package managers with Artifactory.
![JFrog](../.images/jfrog.png)
## Examples
### Configure npm, go, and pypi to use Artifactory
```hcl
module "jfrog" {
source = "https://registry.coder.com/modules/jfrog"
@ -25,15 +19,13 @@ module "jfrog" {
jfrog_url = "https://YYYY.jfrog.io"
artifactory_access_token = var.artifactory_access_token # An admin access token
package_managers = {
"npm": "npm-local",
"go": "go-local",
"pypi": "pypi-local"
"npm": "npm-remote",
"go": "go-remote",
"pypi": "pypi-remote"
}
}
```
## Authentication
Get a JFrog access token from your Artifactory instance. The token must have admin permissions. It is recommended to store the token in a secret terraform variable.
```hcl
@ -42,3 +34,23 @@ variable "artifactory_access_token" {
sensitive = true
}
```
![JFrog](../.images/jfrog.png)
## Examples
### Configure npm, go, and pypi to use Artifactory local repositories
```hcl
module "jfrog" {
source = "https://registry.coder.com/modules/jfrog"
agent_id = coder_agent.example.id
jfrog_url = "https://YYYY.jfrog.io"
artifactory_access_token = var.artifactory_access_token # An admin access token
package_managers = {
"npm": "npm-local",
"go": "go-local",
"pypi": "pypi-local"
}
}
```

Loading…
Cancel
Save