pull/122/head
Muhammad Atif Ali 2 years ago
parent 5b2f3bd599
commit c67575b301

@ -13,7 +13,8 @@ tags: [helper]
```hcl ```hcl
module "MODULE_NAME" { module "MODULE_NAME" {
source = "https://registry.coder.com/modules/MODULE_NAME" source = "registry.coder.com/modules/MODULE_NAME"
version = "1.0.0"
} }
``` ```
@ -27,7 +28,8 @@ Install the Dracula theme from [OpenVSX](https://open-vsx.org/):
```hcl ```hcl
module "MODULE_NAME" { module "MODULE_NAME" {
source = "https://registry.coder.com/modules/MODULE_NAME" source = "registry.coder.com/modules/MODULE_NAME"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
extensions = [ extensions = [
"dracula-theme.theme-dracula" "dracula-theme.theme-dracula"
@ -43,7 +45,8 @@ Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarte
```hcl ```hcl
module "MODULE_NAME" { module "MODULE_NAME" {
source = "https://registry.coder.com/modules/MODULE_NAME" source = "registry.coder.com/modules/MODULE_NAME"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
extensions = [ "dracula-theme.theme-dracula" ] extensions = [ "dracula-theme.theme-dracula" ]
settings = { settings = {
@ -58,7 +61,8 @@ Run code-server in the background, don't fetch it from GitHub:
```hcl ```hcl
module "MODULE_NAME" { module "MODULE_NAME" {
source = "https://registry.coder.com/modules/MODULE_NAME" source = "registry.coder.com/modules/MODULE_NAME"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
offline = true offline = true
} }

@ -20,7 +20,10 @@ $ bun test -t '<module>'
You can test a module locally by updating the source as follows You can test a module locally by updating the source as follows
```hcl ```hcl
module "example" {
source = "git::https://github.com/<USERNAME>/<REPO>.git//<MODULE-NAME>?ref=<BRANCH-NAME>" source = "git::https://github.com/<USERNAME>/<REPO>.git//<MODULE-NAME>?ref=<BRANCH-NAME>"
version = "1.0.0"
}
``` ```
> **Note:** This is the responsibility of the module author to implement tests for their module. and test the module locally before submitting a PR. > **Note:** This is the responsibility of the module author to implement tests for their module. and test the module locally before submitting a PR.

@ -16,7 +16,8 @@ e.g.
```hcl ```hcl
module "code-server" { module "code-server" {
source = "https://registry.coder.com/modules/code-server" source = "registry.coder.com/modules/code-server"
version = "1.0.0"
agent_id = coder_agent.main.id agent_id = coder_agent.main.id
} }
``` ```

@ -16,7 +16,8 @@ Customize the preselected parameter value:
```hcl ```hcl
module "aws-region" { module "aws-region" {
source = "https://registry.coder.com/modules/aws-region" source = "registry.coder.com/modules/aws-region"
version = "1.0.0"
default = "us-east-1" default = "us-east-1"
} }
@ -35,7 +36,8 @@ Change the display name and icon for a region using the corresponding maps:
```hcl ```hcl
module "aws-region" { module "aws-region" {
source = "https://registry.coder.com/modules/aws-region" source = "registry.coder.com/modules/aws-region"
version = "1.0.0"
default = "ap-south-1" default = "ap-south-1"
custom_names = { custom_names = {
"ap-south-1": "Awesome Mumbai!" "ap-south-1": "Awesome Mumbai!"
@ -58,7 +60,8 @@ Hide the Asia Pacific regions Seoul and Osaka:
```hcl ```hcl
module "aws-region" { module "aws-region" {
source = "https://registry.coder.com/modules/aws-region" source = "registry.coder.com/modules/aws-region"
version = "1.0.0"
exclude = [ "ap-northeast-2", "ap-northeast-3" ] exclude = [ "ap-northeast-2", "ap-northeast-3" ]
} }

@ -13,7 +13,8 @@ This module adds a parameter with all Azure regions, allowing developers to sele
```hcl ```hcl
module "azure_region" { module "azure_region" {
source = "https://registry.coder.com/modules/azure-region" source = "registry.coder.com/modules/azure-region"
version = "1.0.0"
default = "eastus" default = "eastus"
} }
@ -32,7 +33,8 @@ Change the display name and icon for a region using the corresponding maps:
```hcl ```hcl
module "azure-region" { module "azure-region" {
source = "https://registry.coder.com/modules/azure-region" source = "registry.coder.com/modules/azure-region"
version = "1.0.0"
custom_names = { custom_names = {
"australia": "Go Australia!" "australia": "Go Australia!"
} }
@ -54,7 +56,8 @@ Hide all regions in Australia except australiacentral:
```hcl ```hcl
module "azure-region" { module "azure-region" {
source = "https://registry.coder.com/modules/azure-region" source = "registry.coder.com/modules/azure-region"
version = "1.0.0"
exclude = [ exclude = [
"australia", "australia",
"australiacentral2", "australiacentral2",

@ -13,7 +13,8 @@ Automatically install [code-server](https://github.com/coder/code-server) in a w
```hcl ```hcl
module "code-server" { module "code-server" {
source = "https://registry.coder.com/modules/code-server" source = "registry.coder.com/modules/code-server"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
} }
``` ```
@ -38,7 +39,8 @@ Install the Dracula theme from [OpenVSX](https://open-vsx.org/):
```hcl ```hcl
module "code-server" { module "code-server" {
source = "https://registry.coder.com/modules/code-server" source = "registry.coder.com/modules/code-server"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
extensions = [ extensions = [
"dracula-theme.theme-dracula" "dracula-theme.theme-dracula"
@ -54,7 +56,8 @@ Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarte
```hcl ```hcl
module "settings" { module "settings" {
source = "https://registry.coder.com/modules/code-server" source = "registry.coder.com/modules/code-server"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
extensions = [ "dracula-theme.theme-dracula" ] extensions = [ "dracula-theme.theme-dracula" ]
settings = { settings = {
@ -69,7 +72,8 @@ Just run code-server in the background, don't fetch it from GitHub:
```hcl ```hcl
module "settings" { module "settings" {
source = "https://registry.coder.com/modules/code-server" source = "registry.coder.com/modules/code-server"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
extensions = [ "dracula-theme.theme-dracula", "ms-azuretools.vscode-docker" ] extensions = [ "dracula-theme.theme-dracula", "ms-azuretools.vscode-docker" ]
} }
@ -81,7 +85,8 @@ Just run code-server in the background, don't fetch it from GitHub:
```hcl ```hcl
module "settings" { module "settings" {
source = "https://registry.coder.com/modules/code-server" source = "registry.coder.com/modules/code-server"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
offline = true offline = true
} }

@ -13,7 +13,8 @@ Allow developers to optionally bring their own [dotfiles repository](https://dot
```hcl ```hcl
module "dotfiles" { module "dotfiles" {
source = "https://registry.coder.com/modules/dotfiles" source = "registry.coder.com/modules/dotfiles"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
} }
``` ```

@ -16,7 +16,8 @@ Customize the preselected parameter value:
```hcl ```hcl
module "exoscale-instance-type" { module "exoscale-instance-type" {
source = "https://registry.coder.com/modules/exoscale-instance-type" source = "registry.coder.com/modules/exoscale-instance-type"
version = "1.0.0"
default = "standard.medium" default = "standard.medium"
} }
@ -43,7 +44,8 @@ Change the display name a type using the corresponding maps:
```hcl ```hcl
module "exoscale-instance-type" { module "exoscale-instance-type" {
source = "https://registry.coder.com/modules/exoscale-instance-type" source = "registry.coder.com/modules/exoscale-instance-type"
version = "1.0.0"
default = "standard.medium" default = "standard.medium"
custom_names = { custom_names = {
"standard.medium": "Mittlere Instanz" # German translation "standard.medium": "Mittlere Instanz" # German translation

@ -16,7 +16,8 @@ Customize the preselected parameter value:
```hcl ```hcl
module "exoscale-zone" { module "exoscale-zone" {
source = "https://registry.coder.com/modules/exoscale-zone" source = "registry.coder.com/modules/exoscale-zone"
version = "1.0.0"
default = "ch-dk-2" default = "ch-dk-2"
} }
@ -42,7 +43,8 @@ Change the display name and icon for a zone using the corresponding maps:
```hcl ```hcl
module "exoscale-zone" { module "exoscale-zone" {
source = "https://registry.coder.com/modules/exoscale-zone" source = "registry.coder.com/modules/exoscale-zone"
version = "1.0.0"
default = "at-vie-1" default = "at-vie-1"
custom_names = { custom_names = {
"at-vie-1": "Home Vienna" "at-vie-1": "Home Vienna"
@ -71,7 +73,8 @@ Hide the Switzerland zones Geneva and Zurich
```hcl ```hcl
module "exoscale-zone" { module "exoscale-zone" {
source = "https://registry.coder.com/modules/exoscale-zone" source = "registry.coder.com/modules/exoscale-zone"
version = "1.0.0"
exclude = [ "ch-gva-2", "ch-dk-2" ] exclude = [ "ch-gva-2", "ch-dk-2" ]
} }

@ -13,7 +13,8 @@ A file browser for your workspace.
```hcl ```hcl
module "filebrowser" { module "filebrowser" {
source = "https://registry.coder.com/modules/filebrowser" source = "registry.coder.com/modules/filebrowser"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
} }
``` ```
@ -26,7 +27,8 @@ module "filebrowser" {
```hcl ```hcl
module "filebrowser" { module "filebrowser" {
source = "https://registry.coder.com/modules/filebrowser" source = "registry.coder.com/modules/filebrowser"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
folder = "/home/coder/project" folder = "/home/coder/project"
} }
@ -36,7 +38,8 @@ module "filebrowser" {
```hcl ```hcl
module "filebrowser" { module "filebrowser" {
source = "https://registry.coder.com/modules/filebrowser" source = "registry.coder.com/modules/filebrowser"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
database_path = ".config/filebrowser.db" database_path = ".config/filebrowser.db"
} }

@ -15,7 +15,8 @@ We can use the simplest format here, only adding a default selection as the `atl
```hcl ```hcl
module "fly-region" { module "fly-region" {
source = "https://registry.coder.com/modules/fly-region" source = "registry.coder.com/modules/fly-region"
version = "1.0.0"
default = "atl" default = "atl"
} }
``` ```
@ -30,7 +31,8 @@ The regions argument can be used to display only the desired regions in the Code
```hcl ```hcl
module "fly-region" { module "fly-region" {
source = "https://registry.coder.com/modules/fly-region" source = "registry.coder.com/modules/fly-region"
version = "1.0.0"
default = "ams" default = "ams"
regions = ["ams", "arn", "atl"] regions = ["ams", "arn", "atl"]
} }
@ -44,7 +46,8 @@ Set custom icons and names with their respective maps.
```hcl ```hcl
module "fly-region" { module "fly-region" {
source = "https://registry.coder.com/modules/fly-region" source = "registry.coder.com/modules/fly-region"
version = "1.0.0"
default = "ams" default = "ams"
custom_icons = { custom_icons = {
"ams" = "/emojis/1f90e.png" "ams" = "/emojis/1f90e.png"

@ -18,7 +18,8 @@ This module has a chance of conflicting with the user's dotfiles / the personali
```hcl ```hcl
module "git-commit-signing" { module "git-commit-signing" {
source = "https://registry.coder.com/modules/git-commit-signing" source = "registry.coder.com/modules/git-commit-signing"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
} }
``` ```

@ -13,7 +13,8 @@ Runs a script that updates git credentials in the workspace to match the user's
```hcl ```hcl
module "git-config" { module "git-config" {
source = "https://registry.coder.com/modules/git-config" source = "registry.coder.com/modules/git-config"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
} }
``` ```
@ -26,7 +27,8 @@ TODO: Add screenshot
```hcl ```hcl
module "git-config" { module "git-config" {
source = "https://registry.coder.com/modules/git-config" source = "registry.coder.com/modules/git-config"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
allow_email_change = true allow_email_change = true
} }
@ -38,7 +40,8 @@ TODO: Add screenshot
```hcl ```hcl
module "git-config" { module "git-config" {
source = "https://registry.coder.com/modules/git-config" source = "registry.coder.com/modules/git-config"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
allow_username_change = false allow_username_change = false
allow_email_change = false allow_email_change = false

@ -18,7 +18,8 @@ Install the JF CLI and authenticate package managers with Artifactory using OAut
```hcl ```hcl
module "jfrog" { module "jfrog" {
source = "https://registry.coder.com/modules/jfrog-oauth" source = "registry.coder.com/modules/jfrog-oauth"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
jfrog_url = "https://jfrog.example.com" jfrog_url = "https://jfrog.example.com"
username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username" username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username"
@ -85,7 +86,8 @@ Configure the Python pip package manager to fetch packages from Artifactory whil
```hcl ```hcl
module "jfrog" { module "jfrog" {
source = "https://registry.coder.com/modules/jfrog-oauth" source = "registry.coder.com/modules/jfrog-oauth"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
jfrog_url = "https://jfrog.example.com" jfrog_url = "https://jfrog.example.com"
auth_method = "oauth" auth_method = "oauth"
@ -112,7 +114,8 @@ The [JFrog extension](https://open-vsx.org/extension/JFrog/jfrog-vscode-extensio
```hcl ```hcl
module "jfrog" { module "jfrog" {
source = "https://registry.coder.com/modules/jfrog-oauth" source = "registry.coder.com/modules/jfrog-oauth"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
jfrog_url = "https://jfrog.example.com" jfrog_url = "https://jfrog.example.com"
username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username" username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username"

@ -14,7 +14,8 @@ Install the JF CLI and authenticate package managers with Artifactory using Arti
```hcl ```hcl
module "jfrog" { module "jfrog" {
source = "https://registry.coder.com/modules/jfrog-token" source = "registry.coder.com/modules/jfrog-token"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
jfrog_url = "https://XXXX.jfrog.io" jfrog_url = "https://XXXX.jfrog.io"
artifactory_access_token = var.artifactory_access_token artifactory_access_token = var.artifactory_access_token
@ -46,7 +47,8 @@ variable "artifactory_access_token" {
```hcl ```hcl
module "jfrog" { module "jfrog" {
source = "https://registry.coder.com/modules/jfrog-token" source = "registry.coder.com/modules/jfrog-token"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
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
@ -78,7 +80,8 @@ The [JFrog extension](https://open-vsx.org/extension/JFrog/jfrog-vscode-extensio
```hcl ```hcl
module "jfrog" { module "jfrog" {
source = "https://registry.coder.com/modules/jfrog-token" source = "registry.coder.com/modules/jfrog-token"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
jfrog_url = "https://XXXX.jfrog.io" jfrog_url = "https://XXXX.jfrog.io"
artifactory_access_token = var.artifactory_access_token artifactory_access_token = var.artifactory_access_token

@ -15,7 +15,8 @@ A module that adds Jupyter Notebook in your Coder template.
```hcl ```hcl
module "jupyter-notebook" { module "jupyter-notebook" {
source = "https://registry.coder.com/modules/jupyter-notebook" source = "registry.coder.com/modules/jupyter-notebook"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
} }
``` ```

@ -15,7 +15,8 @@ A module that adds JupyterLab in your Coder template.
```hcl ```hcl
module "jupyterlab" { module "jupyterlab" {
source = "https://registry.coder.com/modules/jupyterlab" source = "registry.coder.com/modules/jupyterlab"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
} }
``` ```

@ -13,7 +13,8 @@ Run a script on workspace start that allows developers to run custom commands to
```hcl ```hcl
module "personalize" { module "personalize" {
source = "https://registry.coder.com/modules/personalize" source = "registry.coder.com/modules/personalize"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
} }
``` ```

@ -12,7 +12,7 @@ tags: [helper]
Add the `slackme` command to your workspace that DMs you on Slack when your command finishes running. Add the `slackme` command to your workspace that DMs you on Slack when your command finishes running.
```bash ```bash
$ slackme npm run long-build slackme npm run long-build
``` ```
## Setup ## Setup
@ -56,7 +56,8 @@ $ slackme npm run long-build
```hcl ```hcl
module "slackme" { module "slackme" {
source = "https://registry.coder.com/modules/slackme" source = "registry.coder.com/modules/slackme"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
auth_provider_id = "slack" auth_provider_id = "slack"
} }
@ -71,7 +72,8 @@ $ slackme npm run long-build
```hcl ```hcl
module "slackme" { module "slackme" {
source = "https://registry.coder.com/modules/slackme" source = "registry.coder.com/modules/slackme"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
auth_provider_id = "slack" auth_provider_id = "slack"
slack_message = <<EOF slack_message = <<EOF

@ -15,7 +15,8 @@ Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder)
```hcl ```hcl
module "vscode" { module "vscode" {
source = "https://registry.coder.com/modules/vscode-desktop" source = "registry.coder.com/modules/vscode-desktop"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
} }
``` ```
@ -26,7 +27,8 @@ module "vscode" {
```hcl ```hcl
module "vscode" { module "vscode" {
source = "https://registry.coder.com/modules/vscode-desktop" source = "registry.coder.com/modules/vscode-desktop"
version = "1.0.0"
agent_id = coder_agent.example.id agent_id = coder_agent.example.id
folder = "/home/coder/project" folder = "/home/coder/project"
} }

Loading…
Cancel
Save