Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: promote count usage to prevent module download on stop #371

Merged
merged 4 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .sample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ tags: [helper]

```tf
module "MODULE_NAME" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/MODULE_NAME/coder"
version = "1.0.2"
}
Expand All @@ -28,6 +29,7 @@ Install the Dracula theme from [OpenVSX](https://open-vsx.org/):

```tf
module "MODULE_NAME" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/MODULE_NAME/coder"
version = "1.0.2"
agent_id = coder_agent.example.id
Expand All @@ -45,6 +47,7 @@ Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarte

```tf
module "MODULE_NAME" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/MODULE_NAME/coder"
version = "1.0.2"
agent_id = coder_agent.example.id
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ e.g.

```tf
module "code-server" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.2"
agent_id = coder_agent.main.id
Expand Down
1 change: 1 addition & 0 deletions apache-airflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ A module that adds Apache Airflow in your Coder template.

```tf
module "airflow" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/apache-airflow/coder"
version = "1.0.13"
agent_id = coder_agent.main.id
Expand Down
3 changes: 3 additions & 0 deletions aws-region/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Customize the preselected parameter value:

```tf
module "aws-region" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/aws-region/coder"
version = "1.0.12"
default = "us-east-1"
Expand All @@ -36,6 +37,7 @@ Change the display name and icon for a region using the corresponding maps:

```tf
module "aws-region" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/aws-region/coder"
version = "1.0.12"
default = "ap-south-1"
Expand All @@ -62,6 +64,7 @@ Hide the Asia Pacific regions Seoul and Osaka:

```tf
module "aws-region" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/aws-region/coder"
version = "1.0.12"
exclude = ["ap-northeast-2", "ap-northeast-3"]
Expand Down
3 changes: 3 additions & 0 deletions azure-region/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This module adds a parameter with all Azure regions, allowing developers to sele

```tf
module "azure_region" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/azure-region/coder"
version = "1.0.12"
default = "eastus"
Expand All @@ -33,6 +34,7 @@ Change the display name and icon for a region using the corresponding maps:

```tf
module "azure-region" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/azure-region/coder"
version = "1.0.12"
custom_names = {
Expand All @@ -56,6 +58,7 @@ Hide all regions in Australia except australiacentral:

```tf
module "azure-region" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/azure-region/coder"
version = "1.0.12"
exclude = [
Expand Down
7 changes: 7 additions & 0 deletions code-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Automatically install [code-server](https://github.com/coder/code-server) in a w

```tf
module "code-server" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.26"
agent_id = coder_agent.example.id
Expand All @@ -27,6 +28,7 @@ module "code-server" {

```tf
module "code-server" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.26"
agent_id = coder_agent.example.id
Expand All @@ -40,6 +42,7 @@ Install the Dracula theme from [OpenVSX](https://open-vsx.org/):

```tf
module "code-server" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.26"
agent_id = coder_agent.example.id
Expand All @@ -57,6 +60,7 @@ Configure VS Code's [settings.json](https://code.visualstudio.com/docs/getstarte

```tf
module "code-server" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.26"
agent_id = coder_agent.example.id
Expand All @@ -73,6 +77,7 @@ Just run code-server in the background, don't fetch it from GitHub:

```tf
module "code-server" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.26"
agent_id = coder_agent.example.id
Expand All @@ -88,6 +93,7 @@ Run an existing copy of code-server if found, otherwise download from GitHub:

```tf
module "code-server" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.26"
agent_id = coder_agent.example.id
Expand All @@ -100,6 +106,7 @@ Just run code-server in the background, don't fetch it from GitHub:

```tf
module "code-server" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/code-server/coder"
version = "1.0.26"
agent_id = coder_agent.example.id
Expand Down
1 change: 1 addition & 0 deletions coder-login/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Automatically logs the user into Coder when creating their workspace.

```tf
module "coder-login" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/coder-login/coder"
version = "1.0.15"
agent_id = coder_agent.example.id
Expand Down
2 changes: 2 additions & 0 deletions cursor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Uses the [Coder Remote VS Code Extension](https://github.com/coder/cursor-coder)

```tf
module "cursor" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/cursor/coder"
version = "1.0.19"
agent_id = coder_agent.example.id
Expand All @@ -27,6 +28,7 @@ module "cursor" {

```tf
module "cursor" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/cursor/coder"
version = "1.0.19"
agent_id = coder_agent.example.id
Expand Down
6 changes: 6 additions & 0 deletions dotfiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Under the hood, this module uses the [coder dotfiles](https://coder.com/docs/v2/

```tf
module "dotfiles" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/dotfiles/coder"
version = "1.0.18"
agent_id = coder_agent.example.id
Expand All @@ -29,6 +30,7 @@ module "dotfiles" {

```tf
module "dotfiles" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/dotfiles/coder"
version = "1.0.18"
agent_id = coder_agent.example.id
Expand All @@ -39,6 +41,7 @@ module "dotfiles" {

```tf
module "dotfiles" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/dotfiles/coder"
version = "1.0.18"
agent_id = coder_agent.example.id
Expand All @@ -50,12 +53,14 @@ module "dotfiles" {

```tf
module "dotfiles" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/dotfiles/coder"
version = "1.0.18"
agent_id = coder_agent.example.id
}

module "dotfiles-root" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/dotfiles/coder"
version = "1.0.18"
agent_id = coder_agent.example.id
Expand All @@ -70,6 +75,7 @@ You can set a default dotfiles repository for all users by setting the `default_

```tf
module "dotfiles" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/dotfiles/coder"
version = "1.0.18"
agent_id = coder_agent.example.id
Expand Down
3 changes: 3 additions & 0 deletions exoscale-instance-type/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Customize the preselected parameter value:

```tf
module "exoscale-instance-type" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/exoscale-instance-type/coder"
version = "1.0.12"
default = "standard.medium"
Expand Down Expand Up @@ -44,6 +45,7 @@ Change the display name a type using the corresponding maps:

```tf
module "exoscale-instance-type" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/exoscale-instance-type/coder"
version = "1.0.12"
default = "standard.medium"
Expand Down Expand Up @@ -78,6 +80,7 @@ Show only gpu1 types

```tf
module "exoscale-instance-type" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/exoscale-instance-type/coder"
version = "1.0.12"
default = "gpu.large"
Expand Down
2 changes: 2 additions & 0 deletions exoscale-zone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Customize the preselected parameter value:

```tf
module "exoscale-zone" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/exoscale-zone/coder"
version = "1.0.12"
default = "ch-dk-2"
Expand Down Expand Up @@ -43,6 +44,7 @@ Change the display name and icon for a zone using the corresponding maps:

```tf
module "exoscale-zone" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/exoscale-zone/coder"
version = "1.0.12"
default = "at-vie-1"
Expand Down
5 changes: 5 additions & 0 deletions filebrowser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ A file browser for your workspace.

```tf
module "filebrowser" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/filebrowser/coder"
version = "1.0.23"
agent_id = coder_agent.example.id
Expand All @@ -27,6 +28,7 @@ module "filebrowser" {

```tf
module "filebrowser" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/filebrowser/coder"
version = "1.0.23"
agent_id = coder_agent.example.id
Expand All @@ -38,6 +40,7 @@ module "filebrowser" {

```tf
module "filebrowser" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/filebrowser/coder"
version = "1.0.23"
agent_id = coder_agent.example.id
Expand All @@ -49,7 +52,9 @@ module "filebrowser" {

```tf
module "filebrowser" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/filebrowser/coder"
version = "1.0.23"
agent_id = coder_agent.example.id
agent_name = "main"
subdomain = false
Expand Down
3 changes: 3 additions & 0 deletions fly-region/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ We can use the simplest format here, only adding a default selection as the `atl

```tf
module "fly-region" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/fly-region/coder"
version = "1.0.2"
default = "atl"
Expand All @@ -31,6 +32,7 @@ The regions argument can be used to display only the desired regions in the Code

```tf
module "fly-region" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/fly-region/coder"
version = "1.0.2"
default = "ams"
Expand All @@ -46,6 +48,7 @@ Set custom icons and names with their respective maps.

```tf
module "fly-region" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/fly-region/coder"
version = "1.0.2"
default = "ams"
Expand Down
4 changes: 4 additions & 0 deletions gcp-region/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This module adds Google Cloud Platform regions to your Coder template.

```tf
module "gcp_region" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/gcp-region/coder"
version = "1.0.12"
regions = ["us", "europe"]
Expand All @@ -33,6 +34,7 @@ Note: setting `gpu_only = true` and using a default region without GPU support,

```tf
module "gcp_region" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/gcp-region/coder"
version = "1.0.12"
default = ["us-west1-a"]
Expand All @@ -49,6 +51,7 @@ resource "google_compute_instance" "example" {

```tf
module "gcp_region" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/gcp-region/coder"
version = "1.0.12"
regions = ["europe-west"]
Expand All @@ -64,6 +67,7 @@ resource "google_compute_instance" "example" {

```tf
module "gcp_region" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/modules/gcp-region/coder"
version = "1.0.12"
regions = ["us", "europe"]
Expand Down
Loading
Loading