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) ![AWS Regions](../.images/aws-region.png)
## Examples
### Default Region
Customize the preselected parameter value: Customize the preselected parameter value:
```hcl ```hcl
@ -31,6 +27,8 @@ provider "aws" {
} }
``` ```
## Examples
### Customize Regions ### Customize Regions
Change the display name and icon for a region: 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. This module adds a parameter with all Azure regions, allowing developers to select the region closest to them.
## Examples
### Default region
```hcl ```hcl
module "azure_region" { module "azure_region" {
source = "https://registry.coder.com/modules/azure-region" source = "https://registry.coder.com/modules/azure-region"
@ -26,6 +22,8 @@ resource "azurem_resource_group" "example" {
} }
``` ```
## Examples
### Customize existing regions ### Customize existing regions
Change the display name for a region: 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`). 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. We can use the simplest format here, only adding a default selection as the `atl` region.
```hcl ```hcl
@ -26,6 +22,8 @@ module "fly-region" {
![Fly.io Default](../.images/flyio-basic.png) ![Fly.io Default](../.images/flyio-basic.png)
## Examples
### Using region whitelist ### Using region whitelist
The regions argument can be used to display only the desired regions in the Coder parameter. The regions argument can be used to display only the desired regions in the Coder parameter.

@ -11,11 +11,18 @@ tags: [gcp, regions, parameter, helper]
This module adds Google Cloud Platform regions to your Coder template. 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) ![GCP Regions](../.images/gcp-regions.png)
## Examples ## Examples
1. Add only GPU zones in the US West 1 region: ### Add only GPU zones in the US West 1 region
```hcl ```hcl
module "gcp_region" { module "gcp_region" {
@ -26,7 +33,7 @@ This module adds Google Cloud Platform regions to your Coder template.
} }
``` ```
2. Add all zones in the Europe West region: ### Add all zones in the Europe West region
```hcl ```hcl
module "gcp_region" { module "gcp_region" {
@ -36,7 +43,7 @@ This module adds Google Cloud Platform regions to your Coder template.
} }
``` ```
3. Add a single zone from each region in US and Europe that laos has GPUs ### Add a single zone from each region in US and Europe that laos has GPUs
```hcl ```hcl
module "gcp_region" { module "gcp_region" {

@ -12,12 +12,6 @@ tags: [integration]
Install the JF CLI and authenticate package managers with Artifactory. Install the JF CLI and authenticate package managers with Artifactory.
![JFrog](../.images/jfrog.png)
## Examples
### Configure npm, go, and pypi to use Artifactory
```hcl ```hcl
module "jfrog" { module "jfrog" {
source = "https://registry.coder.com/modules/jfrog" source = "https://registry.coder.com/modules/jfrog"
@ -25,15 +19,13 @@ module "jfrog" {
jfrog_url = "https://YYYY.jfrog.io" jfrog_url = "https://YYYY.jfrog.io"
artifactory_access_token = var.artifactory_access_token # An admin access token artifactory_access_token = var.artifactory_access_token # An admin access token
package_managers = { package_managers = {
"npm": "npm-local", "npm": "npm-remote",
"go": "go-local", "go": "go-remote",
"pypi": "pypi-local" "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. 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 ```hcl
@ -42,3 +34,23 @@ variable "artifactory_access_token" {
sensitive = true 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