chore: update metadata (#54)

pull/58/head
Muhammad Atif Ali 2 years ago committed by GitHub
parent ab527c8ffd
commit c3d8a9949c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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:

@ -4,17 +4,13 @@ description: A parameter with human region names and icons
icon: ../.icons/fly.svg icon: ../.icons/fly.svg
maintainer_github: coder maintainer_github: coder
verified: true verified: true
tags: [helper, parameter, fly] tags: [helper, parameter, fly.io, regions]
--- ---
# Fly.io Region # Fly.io Region
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,38 +11,61 @@ 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"]
}
resource "google_compute_instance" "example" {
zone = module.gcp_region.value
}
```
![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" {
source = "https://registry.coder.com/modules/gcp-region" source = "https://registry.coder.com/modules/gcp-region"
default = ["us-west1-a"] default = ["us-west1-a"]
regions = ["us-west1"] regions = ["us-west1"]
gpu_only = false gpu_only = false
} }
```
2. Add all zones in the Europe West region: resource "google_compute_instance" "example" {
zone = module.gcp_region.value
}
```
```hcl ### Add all zones in the Europe West region
module "gcp_region" {
```hcl
module "gcp_region" {
source = "https://registry.coder.com/modules/gcp-region" source = "https://registry.coder.com/modules/gcp-region"
regions = ["europe-west"] regions = ["europe-west"]
single_zone_per_region = false single_zone_per_region = false
} }
```
resource "google_compute_instance" "example" {
zone = module.gcp_region.value
}
```
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" {
source = "https://registry.coder.com/modules/gcp-region" source = "https://registry.coder.com/modules/gcp-region"
regions = ["us", "europe"] regions = ["us", "europe"]
gpu_only = true gpu_only = true
single_zone_per_region = true single_zone_per_region = true
} }
```
resource "google_compute_instance" "example" {
zone = module.gcp_region.value
}
```

@ -14,6 +14,7 @@ This module allows you to automatically clone a repository by URL and skip if it
```hcl ```hcl
module "git-clone" { module "git-clone" {
source = "https://registry.coder.com/modules/git-clone" source = "https://registry.coder.com/modules/git-clone"
agent_id = coder_agent.example.id
url = "https://github.com/coder/coder" url = "https://github.com/coder/coder"
} }
``` ```
@ -33,6 +34,7 @@ data "coder_git_auth" "github" {
```hcl ```hcl
module "git-clone" { module "git-clone" {
source = "https://registry.coder.com/modules/git-clone" source = "https://registry.coder.com/modules/git-clone"
agent_id = coder_agent.example.id
url = "https://github.com/coder/coder" url = "https://github.com/coder/coder"
path = "~/projects/coder/coder" path = "~/projects/coder/coder"
} }

@ -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"
}
}
```

@ -1,38 +0,0 @@
---
display_name: vscode-server
description: VS Code Web - Visual Studio Code in the browser
icon: ../.icons/code.svg
maintainer_github: coder
verified: true
tags: [helper, ide, vscode, web]
---
# VS Code Web
Automatically install [Visual Studio Code Server](https://code.visualstudio.com/docs/remote/vscode-server) in a workspace using the [VS Code CLIs](https://code.visualstudio.com/docs/editor/command-line) and create an app to access it via the dashboard.
![VS Code Server with GitHub Copilot and live-share](../.images/vscode-server.gif)
## Examples
1. Install VS Code Server with default settings:
```hcl
module "vscode-web" {
source = "https://registry.coder.com/modules/vscode-server"
agent_id = coder_agent.example.id
accept_license = true
}
```
2. Install VS Code Server to a custom folder:
```hcl
module "vscode-web" {
source = "https://registry.coder.com/modules/vscode-server"
agent_id = coder_agent.example.id
install_dir = "/home/coder/.vscode-server"
folder = "/home/coder"
accept_license = true
}
```

@ -0,0 +1,36 @@
---
display_name: VS Code Web
description: VS Code Web - Visual Studio Code in the browser
icon: ../.icons/code.svg
maintainer_github: coder
verified: true
tags: [helper, ide, vscode, web]
---
# VS Code Web
Automatically install [Visual Studio Code Server](https://code.visualstudio.com/docs/remote/vscode-server) in a workspace using the [VS Code CLI](https://code.visualstudio.com/docs/editor/command-line) and create an app to access it via the dashboard.
```hcl
module "vscode-web" {
source = "https://registry.coder.com/modules/vscode-server"
agent_id = coder_agent.example.id
accept_license = true
}
```
![VS Code Server with GitHub Copilot and live-share](../.images/vscode-server.gif)
## Examples
### Install VS Code Server to a custom folder
```hcl
module "vscode-web" {
source = "https://registry.coder.com/modules/vscode-server"
agent_id = coder_agent.example.id
install_dir = "/home/coder/.vscode-server"
folder = "/home/coder"
accept_license = true
}
```

@ -22,14 +22,14 @@ variable "port" {
variable "folder" { variable "folder" {
type = string type = string
description = "The folder to open in vscode-server." description = "The folder to open in vscode-web."
default = "" default = ""
} }
variable "log_path" { variable "log_path" {
type = string type = string
description = "The path to log." description = "The path to log."
default = "/tmp/vscode-server.log" default = "/tmp/vscode-web.log"
} }
variable "install_dir" { variable "install_dir" {
@ -48,7 +48,7 @@ variable "accept_license" {
} }
} }
resource "coder_script" "vscode-server" { resource "coder_script" "vscode-web" {
agent_id = var.agent_id agent_id = var.agent_id
display_name = "VS Code Web" display_name = "VS Code Web"
icon = "/icon/code.svg" icon = "/icon/code.svg"
@ -60,9 +60,9 @@ resource "coder_script" "vscode-server" {
run_on_start = true run_on_start = true
} }
resource "coder_app" "vscode-server" { resource "coder_app" "vscode-web" {
agent_id = var.agent_id agent_id = var.agent_id
slug = "vscode-server" slug = "vscode-web"
display_name = "VS Code Web" display_name = "VS Code Web"
url = var.folder == "" ? "http://localhost:${var.port}" : "http://localhost:${var.port}?folder=${var.folder}" url = var.folder == "" ? "http://localhost:${var.port}" : "http://localhost:${var.port}?folder=${var.folder}"
icon = "/icon/code.svg" icon = "/icon/code.svg"
Loading…
Cancel
Save