chore: add prettier terraform formatting in markdown files (#134)
This commit is contained in:
committed by
GitHub
parent
7d31865c94
commit
376c0cae31
@@ -11,7 +11,7 @@ tags: [helper]
|
|||||||
|
|
||||||
<!-- Describes what this module does -->
|
<!-- Describes what this module does -->
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "MODULE_NAME" {
|
module "MODULE_NAME" {
|
||||||
source = "registry.coder.com/modules/MODULE_NAME/coder"
|
source = "registry.coder.com/modules/MODULE_NAME/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
@@ -26,7 +26,7 @@ module "MODULE_NAME" {
|
|||||||
|
|
||||||
Install the Dracula theme from [OpenVSX](https://open-vsx.org/):
|
Install the Dracula theme from [OpenVSX](https://open-vsx.org/):
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "MODULE_NAME" {
|
module "MODULE_NAME" {
|
||||||
source = "registry.coder.com/modules/MODULE_NAME/coder"
|
source = "registry.coder.com/modules/MODULE_NAME/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
@@ -43,7 +43,7 @@ Enter the `<author>.<name>` into the extensions array and code-server will autom
|
|||||||
|
|
||||||
Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarted/settings#_settingsjson) file:
|
Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarted/settings#_settingsjson) file:
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "MODULE_NAME" {
|
module "MODULE_NAME" {
|
||||||
source = "registry.coder.com/modules/MODULE_NAME/coder"
|
source = "registry.coder.com/modules/MODULE_NAME/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
@@ -59,7 +59,7 @@ module "MODULE_NAME" {
|
|||||||
|
|
||||||
Run code-server in the background, don't fetch it from GitHub:
|
Run code-server in the background, don't fetch it from GitHub:
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "MODULE_NAME" {
|
module "MODULE_NAME" {
|
||||||
source = "registry.coder.com/modules/MODULE_NAME/coder"
|
source = "registry.coder.com/modules/MODULE_NAME/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ $ 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
|
```tf
|
||||||
module "example" {
|
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>"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ Modules extend Templates to create reusable components for your development envi
|
|||||||
|
|
||||||
e.g.
|
e.g.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "code-server" {
|
module "code-server" {
|
||||||
source = "registry.coder.com/modules/code-server/coder"
|
source = "registry.coder.com/modules/code-server/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.main.id
|
agent_id = coder_agent.main.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ the region closest to them.
|
|||||||
|
|
||||||
Customize the preselected parameter value:
|
Customize the preselected parameter value:
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "aws-region" {
|
module "aws-region" {
|
||||||
source = "registry.coder.com/modules/aws-region/coder"
|
source = "registry.coder.com/modules/aws-region/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
default = "us-east-1"
|
default = "us-east-1"
|
||||||
}
|
}
|
||||||
@@ -34,16 +34,16 @@ provider "aws" {
|
|||||||
|
|
||||||
Change the display name and icon for a region using the corresponding maps:
|
Change the display name and icon for a region using the corresponding maps:
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "aws-region" {
|
module "aws-region" {
|
||||||
source = "registry.coder.com/modules/aws-region/coder"
|
source = "registry.coder.com/modules/aws-region/coder"
|
||||||
version = "1.0.0"
|
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!"
|
||||||
}
|
}
|
||||||
custom_icons = {
|
custom_icons = {
|
||||||
"ap-south-1": "/emojis/1f33a.png"
|
"ap-south-1" : "/emojis/1f33a.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,11 +58,11 @@ provider "aws" {
|
|||||||
|
|
||||||
Hide the Asia Pacific regions Seoul and Osaka:
|
Hide the Asia Pacific regions Seoul and Osaka:
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "aws-region" {
|
module "aws-region" {
|
||||||
source = "registry.coder.com/modules/aws-region/coder"
|
source = "registry.coder.com/modules/aws-region/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
exclude = [ "ap-northeast-2", "ap-northeast-3" ]
|
exclude = ["ap-northeast-2", "ap-northeast-3"]
|
||||||
}
|
}
|
||||||
|
|
||||||
provider "aws" {
|
provider "aws" {
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ 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.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "azure_region" {
|
module "azure_region" {
|
||||||
source = "registry.coder.com/modules/azure-region/coder"
|
source = "registry.coder.com/modules/azure-region/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
default = "eastus"
|
default = "eastus"
|
||||||
}
|
}
|
||||||
@@ -31,15 +31,15 @@ resource "azurem_resource_group" "example" {
|
|||||||
|
|
||||||
Change the display name and icon for a region using the corresponding maps:
|
Change the display name and icon for a region using the corresponding maps:
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "azure-region" {
|
module "azure-region" {
|
||||||
source = "registry.coder.com/modules/azure-region/coder"
|
source = "registry.coder.com/modules/azure-region/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
custom_names = {
|
custom_names = {
|
||||||
"australia": "Go Australia!"
|
"australia" : "Go Australia!"
|
||||||
}
|
}
|
||||||
custom_icons = {
|
custom_icons = {
|
||||||
"australia": "/icons/smiley.svg"
|
"australia" : "/icons/smiley.svg"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,9 +54,9 @@ resource "azurerm_resource_group" "example" {
|
|||||||
|
|
||||||
Hide all regions in Australia except australiacentral:
|
Hide all regions in Australia except australiacentral:
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "azure-region" {
|
module "azure-region" {
|
||||||
source = "registry.coder.com/modules/azure-region/coder"
|
source = "registry.coder.com/modules/azure-region/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
exclude = [
|
exclude = [
|
||||||
"australia",
|
"australia",
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ tags: [helper, ide, web]
|
|||||||
|
|
||||||
Automatically install [code-server](https://github.com/coder/code-server) in a workspace, create an app to access it via the dashboard, install extensions, and pre-configure editor settings.
|
Automatically install [code-server](https://github.com/coder/code-server) in a workspace, create an app to access it via the dashboard, install extensions, and pre-configure editor settings.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "code-server" {
|
module "code-server" {
|
||||||
source = "registry.coder.com/modules/code-server/coder"
|
source = "registry.coder.com/modules/code-server/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -25,7 +25,7 @@ module "code-server" {
|
|||||||
|
|
||||||
### Pin Versions
|
### Pin Versions
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "code-server" {
|
module "code-server" {
|
||||||
source = "registry.coder.com/modules/code-server/coder"
|
source = "registry.coder.com/modules/code-server/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
@@ -38,10 +38,10 @@ module "code-server" {
|
|||||||
|
|
||||||
Install the Dracula theme from [OpenVSX](https://open-vsx.org/):
|
Install the Dracula theme from [OpenVSX](https://open-vsx.org/):
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "code-server" {
|
module "code-server" {
|
||||||
source = "registry.coder.com/modules/code-server/coder"
|
source = "registry.coder.com/modules/code-server/coder"
|
||||||
version = "1.0.0"
|
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"
|
||||||
@@ -55,12 +55,12 @@ Enter the `<author>.<name>` into the extensions array and code-server will autom
|
|||||||
|
|
||||||
Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarted/settings#_settingsjson) file:
|
Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarted/settings#_settingsjson) file:
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "settings" {
|
module "settings" {
|
||||||
source = "registry.coder.com/modules/code-server/coder"
|
source = "registry.coder.com/modules/code-server/coder"
|
||||||
version = "1.0.0"
|
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 = {
|
||||||
"workbench.colorTheme" = "Dracula"
|
"workbench.colorTheme" = "Dracula"
|
||||||
}
|
}
|
||||||
@@ -71,12 +71,12 @@ module "settings" {
|
|||||||
|
|
||||||
Just run code-server in the background, don't fetch it from GitHub:
|
Just run code-server in the background, don't fetch it from GitHub:
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "settings" {
|
module "settings" {
|
||||||
source = "registry.coder.com/modules/code-server/coder"
|
source = "registry.coder.com/modules/code-server/coder"
|
||||||
version = "1.0.0"
|
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"]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -84,11 +84,11 @@ module "settings" {
|
|||||||
|
|
||||||
Just run code-server in the background, don't fetch it from GitHub:
|
Just run code-server in the background, don't fetch it from GitHub:
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "settings" {
|
module "settings" {
|
||||||
source = "registry.coder.com/modules/code-server/coder"
|
source = "registry.coder.com/modules/code-server/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
offline = true
|
offline = true
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ tags: [helper]
|
|||||||
|
|
||||||
Automatically logs the user into Coder when creating their workspace.
|
Automatically logs the user into Coder when creating their workspace.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "coder-login" {
|
module "coder-login" {
|
||||||
source = "registry.coder.com/modules/coder-login/coder"
|
source = "registry.coder.com/modules/coder-login/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ tags: [helper]
|
|||||||
|
|
||||||
Allow developers to optionally bring their own [dotfiles repository](https://dotfiles.github.io)! Under the hood, this module uses the [coder dotfiles](https://coder.com/docs/v2/latest/dotfiles) command.
|
Allow developers to optionally bring their own [dotfiles repository](https://dotfiles.github.io)! Under the hood, this module uses the [coder dotfiles](https://coder.com/docs/v2/latest/dotfiles) command.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "dotfiles" {
|
module "dotfiles" {
|
||||||
source = "registry.coder.com/modules/dotfiles/coder"
|
source = "registry.coder.com/modules/dotfiles/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -14,16 +14,16 @@ their desired virtuell machine for the workspace.
|
|||||||
|
|
||||||
Customize the preselected parameter value:
|
Customize the preselected parameter value:
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "exoscale-instance-type" {
|
module "exoscale-instance-type" {
|
||||||
source = "registry.coder.com/modules/exoscale-instance-type/coder"
|
source = "registry.coder.com/modules/exoscale-instance-type/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
default = "standard.medium"
|
default = "standard.medium"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "exoscale_compute_instance" "instance" {
|
resource "exoscale_compute_instance" "instance" {
|
||||||
type = module.exoscale-instance-type.value
|
type = module.exoscale-instance-type.value
|
||||||
...
|
# ...
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "coder_metadata" "workspace_info" {
|
resource "coder_metadata" "workspace_info" {
|
||||||
@@ -42,22 +42,22 @@ resource "coder_metadata" "workspace_info" {
|
|||||||
|
|
||||||
Change the display name a type using the corresponding maps:
|
Change the display name a type using the corresponding maps:
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "exoscale-instance-type" {
|
module "exoscale-instance-type" {
|
||||||
source = "registry.coder.com/modules/exoscale-instance-type/coder"
|
source = "registry.coder.com/modules/exoscale-instance-type/coder"
|
||||||
version = "1.0.0"
|
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
|
||||||
}
|
}
|
||||||
custom_descriptions = {
|
custom_descriptions = {
|
||||||
"standard.medium": "4 GB Arbeitsspeicher, 2 Kerne, 10 - 400 GB Festplatte" # German translation
|
"standard.medium" : "4 GB Arbeitsspeicher, 2 Kerne, 10 - 400 GB Festplatte" # German translation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "exoscale_compute_instance" "instance" {
|
resource "exoscale_compute_instance" "instance" {
|
||||||
type = module.exoscale-instance-type.value
|
type = module.exoscale-instance-type.value
|
||||||
...
|
# ...
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "coder_metadata" "workspace_info" {
|
resource "coder_metadata" "workspace_info" {
|
||||||
@@ -74,13 +74,13 @@ resource "coder_metadata" "workspace_info" {
|
|||||||
|
|
||||||
Show only gpu1 types
|
Show only gpu1 types
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "exoscale-instance-type" {
|
module "exoscale-instance-type" {
|
||||||
source = "registry.coder.com/modules/exoscale-instance-type/coder"
|
source = "registry.coder.com/modules/exoscale-instance-type/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
default = "gpu.large"
|
default = "gpu.large"
|
||||||
type_category = ["gpu"]
|
type_category = ["gpu"]
|
||||||
exclude = [
|
exclude = [
|
||||||
"gpu2.small",
|
"gpu2.small",
|
||||||
"gpu2.medium",
|
"gpu2.medium",
|
||||||
"gpu2.large",
|
"gpu2.large",
|
||||||
@@ -93,8 +93,8 @@ module "exoscale-instance-type" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "exoscale_compute_instance" "instance" {
|
resource "exoscale_compute_instance" "instance" {
|
||||||
type = module.exoscale-instance-type.value
|
type = module.exoscale-instance-type.value
|
||||||
...
|
# ...
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "coder_metadata" "workspace_info" {
|
resource "coder_metadata" "workspace_info" {
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ the zone closest to them.
|
|||||||
|
|
||||||
Customize the preselected parameter value:
|
Customize the preselected parameter value:
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "exoscale-zone" {
|
module "exoscale-zone" {
|
||||||
source = "registry.coder.com/modules/exoscale-zone/coder"
|
source = "registry.coder.com/modules/exoscale-zone/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
default = "ch-dk-2"
|
default = "ch-dk-2"
|
||||||
}
|
}
|
||||||
@@ -28,8 +28,8 @@ data "exoscale_compute_template" "my_template" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "exoscale_compute_instance" "instance" {
|
resource "exoscale_compute_instance" "instance" {
|
||||||
zone = module.exoscale-zone.value
|
zone = module.exoscale-zone.value
|
||||||
....
|
# ...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -41,16 +41,16 @@ resource "exoscale_compute_instance" "instance" {
|
|||||||
|
|
||||||
Change the display name and icon for a zone using the corresponding maps:
|
Change the display name and icon for a zone using the corresponding maps:
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "exoscale-zone" {
|
module "exoscale-zone" {
|
||||||
source = "registry.coder.com/modules/exoscale-zone/coder"
|
source = "registry.coder.com/modules/exoscale-zone/coder"
|
||||||
version = "1.0.0"
|
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"
|
||||||
}
|
}
|
||||||
custom_icons = {
|
custom_icons = {
|
||||||
"at-vie-1": "/emojis/1f3e0.png"
|
"at-vie-1" : "/emojis/1f3e0.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,8 +60,8 @@ data "exoscale_compute_template" "my_template" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "exoscale_compute_instance" "instance" {
|
resource "exoscale_compute_instance" "instance" {
|
||||||
zone = module.exoscale-zone.value
|
zone = module.exoscale-zone.value
|
||||||
....
|
# ...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -71,11 +71,11 @@ resource "exoscale_compute_instance" "instance" {
|
|||||||
|
|
||||||
Hide the Switzerland zones Geneva and Zurich
|
Hide the Switzerland zones Geneva and Zurich
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "exoscale-zone" {
|
module "exoscale-zone" {
|
||||||
source = "registry.coder.com/modules/exoscale-zone/coder"
|
source = "registry.coder.com/modules/exoscale-zone/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
exclude = [ "ch-gva-2", "ch-dk-2" ]
|
exclude = ["ch-gva-2", "ch-dk-2"]
|
||||||
}
|
}
|
||||||
|
|
||||||
data "exoscale_compute_template" "my_template" {
|
data "exoscale_compute_template" "my_template" {
|
||||||
@@ -84,8 +84,8 @@ data "exoscale_compute_template" "my_template" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "exoscale_compute_instance" "instance" {
|
resource "exoscale_compute_instance" "instance" {
|
||||||
zone = module.exoscale-zone.value
|
zone = module.exoscale-zone.value
|
||||||
....
|
# ...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ tags: [helper, filebrowser]
|
|||||||
|
|
||||||
A file browser for your workspace.
|
A file browser for your workspace.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "filebrowser" {
|
module "filebrowser" {
|
||||||
source = "registry.coder.com/modules/filebrowser/coder"
|
source = "registry.coder.com/modules/filebrowser/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -25,22 +25,22 @@ module "filebrowser" {
|
|||||||
|
|
||||||
### Serve a specific directory
|
### Serve a specific directory
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "filebrowser" {
|
module "filebrowser" {
|
||||||
source = "registry.coder.com/modules/filebrowser/coder"
|
source = "registry.coder.com/modules/filebrowser/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/project"
|
folder = "/home/coder/project"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Specify location of `filebrowser.db`
|
### Specify location of `filebrowser.db`
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "filebrowser" {
|
module "filebrowser" {
|
||||||
source = "registry.coder.com/modules/filebrowser/coder"
|
source = "registry.coder.com/modules/filebrowser/coder"
|
||||||
version = "1.0.0"
|
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"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ This module adds Fly.io regions to your Coder template. Regions can be whitelist
|
|||||||
|
|
||||||
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
|
```tf
|
||||||
module "fly-region" {
|
module "fly-region" {
|
||||||
source = "registry.coder.com/modules/fly-region/coder"
|
source = "registry.coder.com/modules/fly-region/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
default = "atl"
|
default = "atl"
|
||||||
}
|
}
|
||||||
@@ -29,9 +29,9 @@ module "fly-region" {
|
|||||||
|
|
||||||
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.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "fly-region" {
|
module "fly-region" {
|
||||||
source = "registry.coder.com/modules/fly-region/coder"
|
source = "registry.coder.com/modules/fly-region/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
default = "ams"
|
default = "ams"
|
||||||
regions = ["ams", "arn", "atl"]
|
regions = ["ams", "arn", "atl"]
|
||||||
@@ -44,16 +44,16 @@ module "fly-region" {
|
|||||||
|
|
||||||
Set custom icons and names with their respective maps.
|
Set custom icons and names with their respective maps.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "fly-region" {
|
module "fly-region" {
|
||||||
source = "registry.coder.com/modules/fly-region/coder"
|
source = "registry.coder.com/modules/fly-region/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
default = "ams"
|
default = "ams"
|
||||||
custom_icons = {
|
custom_icons = {
|
||||||
"ams" = "/emojis/1f90e.png"
|
"ams" = "/emojis/1f90e.png"
|
||||||
}
|
}
|
||||||
custom_names = {
|
custom_names = {
|
||||||
"ams" = "We love the Netherlands!"
|
"ams" = "We love the Netherlands!"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ 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
|
```tf
|
||||||
module "gcp_region" {
|
module "gcp_region" {
|
||||||
source = "registry.coder.com/modules/gcp-region/coder"
|
source = "registry.coder.com/modules/gcp-region/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
@@ -31,7 +31,7 @@ resource "google_compute_instance" "example" {
|
|||||||
|
|
||||||
Note: setting `gpu_only = true` and using a default region without GPU support, the default will be set to `null`.
|
Note: setting `gpu_only = true` and using a default region without GPU support, the default will be set to `null`.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "gcp_region" {
|
module "gcp_region" {
|
||||||
source = "registry.coder.com/modules/gcp-region/coder"
|
source = "registry.coder.com/modules/gcp-region/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
@@ -47,7 +47,7 @@ resource "google_compute_instance" "example" {
|
|||||||
|
|
||||||
### Add all zones in the Europe West region
|
### Add all zones in the Europe West region
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "gcp_region" {
|
module "gcp_region" {
|
||||||
source = "registry.coder.com/modules/gcp-region/coder"
|
source = "registry.coder.com/modules/gcp-region/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
@@ -62,7 +62,7 @@ resource "google_compute_instance" "example" {
|
|||||||
|
|
||||||
### 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
|
```tf
|
||||||
module "gcp_region" {
|
module "gcp_region" {
|
||||||
source = "registry.coder.com/modules/gcp-region/coder"
|
source = "registry.coder.com/modules/gcp-region/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ tags: [git, helper]
|
|||||||
|
|
||||||
This module allows you to automatically clone a repository by URL and skip if it exists in the base directory provided.
|
This module allows you to automatically clone a repository by URL and skip if it exists in the base directory provided.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "git-clone" {
|
module "git-clone" {
|
||||||
source = "registry.coder.com/modules/git-clone/coder"
|
source = "registry.coder.com/modules/git-clone/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
@@ -22,7 +22,7 @@ module "git-clone" {
|
|||||||
|
|
||||||
To use with [Git Authentication](https://coder.com/docs/v2/latest/admin/git-providers), add the provider by ID to your template:
|
To use with [Git Authentication](https://coder.com/docs/v2/latest/admin/git-providers), add the provider by ID to your template:
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
data "coder_git_auth" "github" {
|
data "coder_git_auth" "github" {
|
||||||
id = "github"
|
id = "github"
|
||||||
}
|
}
|
||||||
@@ -32,7 +32,7 @@ data "coder_git_auth" "github" {
|
|||||||
|
|
||||||
### Custom Path
|
### Custom Path
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "git-clone" {
|
module "git-clone" {
|
||||||
source = "registry.coder.com/modules/git-clone/coder"
|
source = "registry.coder.com/modules/git-clone/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ Please observe that using the SSH key that's part of your Coder account for comm
|
|||||||
|
|
||||||
This module has a chance of conflicting with the user's dotfiles / the personalize module if one of those has configuration directives that overwrite this module's / each other's git configuration.
|
This module has a chance of conflicting with the user's dotfiles / the personalize module if one of those has configuration directives that overwrite this module's / each other's git configuration.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "git-commit-signing" {
|
module "git-commit-signing" {
|
||||||
source = "registry.coder.com/modules/git-commit-signing/coder"
|
source = "registry.coder.com/modules/git-commit-signing/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ tags: [helper, git]
|
|||||||
|
|
||||||
Runs a script that updates git credentials in the workspace to match the user's Coder credentials, optionally allowing to the developer to override the defaults.
|
Runs a script that updates git credentials in the workspace to match the user's Coder credentials, optionally allowing to the developer to override the defaults.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "git-config" {
|
module "git-config" {
|
||||||
source = "registry.coder.com/modules/git-config/coder"
|
source = "registry.coder.com/modules/git-config/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -25,11 +25,11 @@ TODO: Add screenshot
|
|||||||
|
|
||||||
### Allow users to override both username and email
|
### Allow users to override both username and email
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "git-config" {
|
module "git-config" {
|
||||||
source = "registry.coder.com/modules/git-config/coder"
|
source = "registry.coder.com/modules/git-config/coder"
|
||||||
version = "1.0.0"
|
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,13 +38,13 @@ TODO: Add screenshot
|
|||||||
|
|
||||||
## Disallowing users from overriding both username and email
|
## Disallowing users from overriding both username and email
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "git-config" {
|
module "git-config" {
|
||||||
source = "registry.coder.com/modules/git-config/coder"
|
source = "registry.coder.com/modules/git-config/coder"
|
||||||
version = "1.0.0"
|
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
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ tags: [ide, jetbrains, helper, parameter]
|
|||||||
|
|
||||||
This module adds a JetBrains Gateway Button to open any workspace with a single click.
|
This module adds a JetBrains Gateway Button to open any workspace with a single click.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "jetbrains_gateway" {
|
module "jetbrains_gateway" {
|
||||||
source = "registry.coder.com/modules/jetbrains-gateway/coder"
|
source = "registry.coder.com/modules/jetbrains-gateway/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
@@ -28,14 +28,14 @@ module "jetbrains_gateway" {
|
|||||||
|
|
||||||
### Add GoLand and WebStorm with the default set to GoLand
|
### Add GoLand and WebStorm with the default set to GoLand
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "jetbrains_gateway" {
|
module "jetbrains_gateway" {
|
||||||
source = "registry.coder.com/modules/jetbrains-gateway/coder"
|
source = "registry.coder.com/modules/jetbrains-gateway/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/example"
|
folder = "/home/coder/example"
|
||||||
jetbrains_ides = ["GO", "WS"]
|
jetbrains_ides = ["GO", "WS"]
|
||||||
default = "GO"
|
default = "GO"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -14,17 +14,17 @@ Install the JF CLI and authenticate package managers with Artifactory using OAut
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "jfrog" {
|
module "jfrog" {
|
||||||
source = "registry.coder.com/modules/jfrog-oauth/coder"
|
source = "registry.coder.com/modules/jfrog-oauth/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
jfrog_url = "https://example.jfrog.io"
|
jfrog_url = "https://example.jfrog.io"
|
||||||
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"
|
||||||
package_managers = {
|
package_managers = {
|
||||||
"npm": "npm",
|
"npm" : "npm",
|
||||||
"go": "go",
|
"go" : "go",
|
||||||
"pypi": "pypi"
|
"pypi" : "pypi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -40,15 +40,15 @@ This module is usable by JFrog self-hosted (on-premises) Artifactory as it requi
|
|||||||
|
|
||||||
Configure the Python pip package manager to fetch packages from Artifactory while mapping the Coder email to the Artifactory username.
|
Configure the Python pip package manager to fetch packages from Artifactory while mapping the Coder email to the Artifactory username.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "jfrog" {
|
module "jfrog" {
|
||||||
source = "registry.coder.com/modules/jfrog-oauth/coder"
|
source = "registry.coder.com/modules/jfrog-oauth/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
jfrog_url = "https://example.jfrog.io"
|
jfrog_url = "https://example.jfrog.io"
|
||||||
username_field = "email"
|
username_field = "email"
|
||||||
package_managers = {
|
package_managers = {
|
||||||
"pypi": "pypi"
|
"pypi" : "pypi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -67,18 +67,18 @@ pip install requests
|
|||||||
|
|
||||||
The [JFrog extension](https://open-vsx.org/extension/JFrog/jfrog-vscode-extension) for VS Code allows you to interact with Artifactory from within the IDE.
|
The [JFrog extension](https://open-vsx.org/extension/JFrog/jfrog-vscode-extension) for VS Code allows you to interact with Artifactory from within the IDE.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "jfrog" {
|
module "jfrog" {
|
||||||
source = "registry.coder.com/modules/jfrog-oauth/coder"
|
source = "registry.coder.com/modules/jfrog-oauth/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
jfrog_url = "https://example.jfrog.io"
|
jfrog_url = "https://example.jfrog.io"
|
||||||
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"
|
||||||
configure_code_server = true # Add JFrog extension configuration for code-server
|
configure_code_server = true # Add JFrog extension configuration for code-server
|
||||||
package_managers = {
|
package_managers = {
|
||||||
"npm": "npm",
|
"npm" : "npm",
|
||||||
"go": "go",
|
"go" : "go",
|
||||||
"pypi": "pypi"
|
"pypi" : "pypi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -87,11 +87,11 @@ module "jfrog" {
|
|||||||
|
|
||||||
JFrog Access token is also available as a terraform output. You can use it in other terraform resources. For example, you can use it to configure an [Artifactory docker registry](https://jfrog.com/help/r/jfrog-artifactory-documentation/docker-registry) with the [docker terraform provider](https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs).
|
JFrog Access token is also available as a terraform output. You can use it in other terraform resources. For example, you can use it to configure an [Artifactory docker registry](https://jfrog.com/help/r/jfrog-artifactory-documentation/docker-registry) with the [docker terraform provider](https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs).
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
provider "docker" {
|
provider "docker" {
|
||||||
...
|
# ...
|
||||||
registry_auth {
|
registry_auth {
|
||||||
address = "https://example.jfrog.io/artifactory/api/docker/REPO-KEY"
|
address = "https://example.jfrog.io/artifactory/api/docker/REPO-KEY"
|
||||||
username = module.jfrog.username
|
username = module.jfrog.username
|
||||||
password = module.jfrog.access_token
|
password = module.jfrog.access_token
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,17 +12,17 @@ tags: [integration, jfrog]
|
|||||||
|
|
||||||
Install the JF CLI and authenticate package managers with Artifactory using Artifactory terraform provider.
|
Install the JF CLI and authenticate package managers with Artifactory using Artifactory terraform provider.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "jfrog" {
|
module "jfrog" {
|
||||||
source = "registry.coder.com/modules/jfrog-token/coder"
|
source = "registry.coder.com/modules/jfrog-token/coder"
|
||||||
version = "1.0.0"
|
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
|
||||||
package_managers = {
|
package_managers = {
|
||||||
"npm": "npm",
|
"npm" : "npm",
|
||||||
"go": "go",
|
"go" : "go",
|
||||||
"pypi": "pypi"
|
"pypi" : "pypi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -38,17 +38,17 @@ For detailed instructions, please see this [guide](https://coder.com/docs/v2/lat
|
|||||||
|
|
||||||
### Configure npm, go, and pypi to use Artifactory local repositories
|
### Configure npm, go, and pypi to use Artifactory local repositories
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "jfrog" {
|
module "jfrog" {
|
||||||
source = "registry.coder.com/modules/jfrog-token/coder"
|
source = "registry.coder.com/modules/jfrog-token/coder"
|
||||||
version = "1.0.0"
|
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
|
||||||
package_managers = {
|
package_managers = {
|
||||||
"npm": "npm-local",
|
"npm" : "npm-local",
|
||||||
"go": "go-local",
|
"go" : "go-local",
|
||||||
"pypi": "pypi-local"
|
"pypi" : "pypi-local"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -71,18 +71,18 @@ pip install requests
|
|||||||
|
|
||||||
The [JFrog extension](https://open-vsx.org/extension/JFrog/jfrog-vscode-extension) for VS Code allows you to interact with Artifactory from within the IDE.
|
The [JFrog extension](https://open-vsx.org/extension/JFrog/jfrog-vscode-extension) for VS Code allows you to interact with Artifactory from within the IDE.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "jfrog" {
|
module "jfrog" {
|
||||||
source = "registry.coder.com/modules/jfrog-token/coder"
|
source = "registry.coder.com/modules/jfrog-token/coder"
|
||||||
version = "1.0.0"
|
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
|
||||||
configure_code_server = true # Add JFrog extension configuration for code-server
|
configure_code_server = true # Add JFrog extension configuration for code-server
|
||||||
package_managers = {
|
package_managers = {
|
||||||
"npm": "npm",
|
"npm" : "npm",
|
||||||
"go": "go",
|
"go" : "go",
|
||||||
"pypi": "pypi"
|
"pypi" : "pypi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -91,12 +91,12 @@ module "jfrog" {
|
|||||||
|
|
||||||
JFrog Access token is also available as a terraform output. You can use it in other terraform resources. For example, you can use it to configure an [Artifactory docker registry](https://jfrog.com/help/r/jfrog-artifactory-documentation/docker-registry) with the [docker terraform provider](https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs).
|
JFrog Access token is also available as a terraform output. You can use it in other terraform resources. For example, you can use it to configure an [Artifactory docker registry](https://jfrog.com/help/r/jfrog-artifactory-documentation/docker-registry) with the [docker terraform provider](https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs).
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
|
|
||||||
provider "docker" {
|
provider "docker" {
|
||||||
...
|
# ...
|
||||||
registry_auth {
|
registry_auth {
|
||||||
address = "https://YYYY.jfrog.io/artifactory/api/docker/REPO-KEY"
|
address = "https://YYYY.jfrog.io/artifactory/api/docker/REPO-KEY"
|
||||||
username = module.jfrog.username
|
username = module.jfrog.username
|
||||||
password = module.jfrog.access_token
|
password = module.jfrog.access_token
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ A module that adds Jupyter Notebook in your Coder template.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "jupyter-notebook" {
|
module "jupyter-notebook" {
|
||||||
source = "registry.coder.com/modules/jupyter-notebook/coder"
|
source = "registry.coder.com/modules/jupyter-notebook/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ A module that adds JupyterLab in your Coder template.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "jupyterlab" {
|
module "jupyterlab" {
|
||||||
source = "registry.coder.com/modules/jupyterlab/coder"
|
source = "registry.coder.com/modules/jupyterlab/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
13
package.json
13
package.json
@@ -2,17 +2,24 @@
|
|||||||
"name": "modules",
|
"name": "modules",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "bun test",
|
"test": "bun test",
|
||||||
"fmt": "bun x prettier --plugin prettier-plugin-sh -w **/*.sh .sample/run.sh new.sh **/*.ts **/*.md *.md && terraform fmt **/*.tf .sample/main.tf",
|
"fmt": "bun x prettier -w **/*.sh .sample/run.sh new.sh **/*.ts **/*.md *.md && terraform fmt **/*.tf .sample/main.tf",
|
||||||
"fmt:ci": "bun x prettier --plugin prettier-plugin-sh --check **/*.sh .sample/run.sh new.sh **/*.ts **/*.md *.md && terraform fmt -check **/*.tf .sample/main.tf",
|
"fmt:ci": "bun x prettier --check **/*.sh .sample/run.sh new.sh **/*.ts **/*.md *.md && terraform fmt -check **/*.tf .sample/main.tf",
|
||||||
"lint": "bun run lint.ts"
|
"lint": "bun run lint.ts"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"bun-types": "^1.0.18",
|
"bun-types": "^1.0.18",
|
||||||
"gray-matter": "^4.0.3",
|
"gray-matter": "^4.0.3",
|
||||||
"marked": "^11.1.0",
|
"marked": "^11.1.0",
|
||||||
"prettier-plugin-sh": "^0.13.1"
|
"prettier-plugin-sh": "^0.13.1",
|
||||||
|
"prettier-plugin-terraform-formatter": "^1.2.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"typescript": "^5.3.3"
|
"typescript": "^5.3.3"
|
||||||
|
},
|
||||||
|
"prettier": {
|
||||||
|
"plugins": [
|
||||||
|
"prettier-plugin-sh",
|
||||||
|
"prettier-plugin-terraform-formatter"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ tags: [helper]
|
|||||||
|
|
||||||
Run a script on workspace start that allows developers to run custom commands to personalize their workspace.
|
Run a script on workspace start that allows developers to run custom commands to personalize their workspace.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "personalize" {
|
module "personalize" {
|
||||||
source = "registry.coder.com/modules/personalize/coder"
|
source = "registry.coder.com/modules/personalize/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -54,11 +54,11 @@ slackme npm run long-build
|
|||||||
|
|
||||||
3. Restart your Coder deployment. Any Template can now import the Slack Me module, and `slackme` will be available on the `$PATH`:
|
3. Restart your Coder deployment. Any Template can now import the Slack Me module, and `slackme` will be available on the `$PATH`:
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "slackme" {
|
module "slackme" {
|
||||||
source = "registry.coder.com/modules/slackme/coder"
|
source = "registry.coder.com/modules/slackme/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
auth_provider_id = "slack"
|
auth_provider_id = "slack"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -70,13 +70,13 @@ slackme npm run long-build
|
|||||||
- `$COMMAND` is replaced with the command the user executed.
|
- `$COMMAND` is replaced with the command the user executed.
|
||||||
- `$DURATION` is replaced with a human-readable duration the command took to execute.
|
- `$DURATION` is replaced with a human-readable duration the command took to execute.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "slackme" {
|
module "slackme" {
|
||||||
source = "registry.coder.com/modules/slackme/coder"
|
source = "registry.coder.com/modules/slackme/coder"
|
||||||
version = "1.0.0"
|
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
|
||||||
👋 Hey there from Coder! $COMMAND took $DURATION to execute!
|
👋 Hey there from Coder! $COMMAND took $DURATION to execute!
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ tags: [helper, integration, vault, github]
|
|||||||
|
|
||||||
This module lets you authenticate with [Hashicorp Vault](https://www.vaultproject.io/) in your Coder workspaces using [external auth](https://coder.com/docs/v2/latest/admin/external-auth) for GitHub.
|
This module lets you authenticate with [Hashicorp Vault](https://www.vaultproject.io/) in your Coder workspaces using [external auth](https://coder.com/docs/v2/latest/admin/external-auth) for GitHub.
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "vault" {
|
module "vault" {
|
||||||
source = "registry.coder.com/modules/vault-github/coder"
|
source = "registry.coder.com/modules/vault-github/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
@@ -42,7 +42,7 @@ To configure the Vault module, you must set up a Vault GitHub auth method. See t
|
|||||||
|
|
||||||
### Configure Vault integration with a different Coder GitHub external auth ID (i.e., not the default `github`)
|
### Configure Vault integration with a different Coder GitHub external auth ID (i.e., not the default `github`)
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "vault" {
|
module "vault" {
|
||||||
source = "registry.coder.com/modules/vault-github/coder"
|
source = "registry.coder.com/modules/vault-github/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
@@ -54,7 +54,7 @@ module "vault" {
|
|||||||
|
|
||||||
### Configure Vault integration with a different Coder GitHub external auth ID and a different Vault GitHub auth path
|
### Configure Vault integration with a different Coder GitHub external auth ID and a different Vault GitHub auth path
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "vault" {
|
module "vault" {
|
||||||
source = "registry.coder.com/modules/vault-github/coder"
|
source = "registry.coder.com/modules/vault-github/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
@@ -67,7 +67,7 @@ module "vault" {
|
|||||||
|
|
||||||
### Configure Vault integration and install a specific version of the Vault CLI
|
### Configure Vault integration and install a specific version of the Vault CLI
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "vault" {
|
module "vault" {
|
||||||
source = "registry.coder.com/modules/vault-github/coder"
|
source = "registry.coder.com/modules/vault-github/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ Add a button to open any workspace with a single click.
|
|||||||
|
|
||||||
Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder).
|
Uses the [Coder Remote VS Code Extension](https://github.com/coder/vscode-coder).
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "vscode" {
|
module "vscode" {
|
||||||
source = "registry.coder.com/modules/vscode-desktop/coder"
|
source = "registry.coder.com/modules/vscode-desktop/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -25,11 +25,11 @@ module "vscode" {
|
|||||||
|
|
||||||
### Open in a specific directory
|
### Open in a specific directory
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "vscode" {
|
module "vscode" {
|
||||||
source = "registry.coder.com/modules/vscode-desktop/coder"
|
source = "registry.coder.com/modules/vscode-desktop/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/project"
|
folder = "/home/coder/project"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ tags: [helper, ide, vscode, 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.
|
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
|
```tf
|
||||||
module "vscode-web" {
|
module "vscode-web" {
|
||||||
source = "registry.coder.com/modules/vscode-web/coder"
|
source = "registry.coder.com/modules/vscode-web/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
@@ -26,13 +26,13 @@ module "vscode-web" {
|
|||||||
|
|
||||||
### Install VS Code Web to a custom folder
|
### Install VS Code Web to a custom folder
|
||||||
|
|
||||||
```hcl
|
```tf
|
||||||
module "vscode-web" {
|
module "vscode-web" {
|
||||||
source = "registry.coder.com/modules/vscode-web/coder"
|
source = "registry.coder.com/modules/vscode-web/coder"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
install_dir = "/home/coder/.vscode-web"
|
install_dir = "/home/coder/.vscode-web"
|
||||||
folder = "/home/coder"
|
folder = "/home/coder"
|
||||||
accept_license = true
|
accept_license = true
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user