Skip to content

Commit 7654140

Browse files
authored
docs: promote count usage to prevent module download on stop (#371)
1 parent bc6490f commit 7654140

File tree

31 files changed

+102
-10
lines changed

31 files changed

+102
-10
lines changed

Diff for: .sample/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ tags: [helper]
1313

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

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

4648
```tf
4749
module "MODULE_NAME" {
50+
count = data.coder_workspace.me.start_count
4851
source = "registry.coder.com/modules/MODULE_NAME/coder"
4952
version = "1.0.2"
5053
agent_id = coder_agent.example.id

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ e.g.
1717

1818
```tf
1919
module "code-server" {
20+
count = data.coder_workspace.me.start_count
2021
source = "registry.coder.com/modules/code-server/coder"
2122
version = "1.0.2"
2223
agent_id = coder_agent.main.id

Diff for: apache-airflow/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ A module that adds Apache Airflow in your Coder template.
1414

1515
```tf
1616
module "airflow" {
17+
count = data.coder_workspace.me.start_count
1718
source = "registry.coder.com/modules/apache-airflow/coder"
1819
version = "1.0.13"
1920
agent_id = coder_agent.main.id

Diff for: aws-region/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Customize the preselected parameter value:
1616

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

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

6365
```tf
6466
module "aws-region" {
67+
count = data.coder_workspace.me.start_count
6568
source = "registry.coder.com/modules/aws-region/coder"
6669
version = "1.0.12"
6770
exclude = ["ap-northeast-2", "ap-northeast-3"]

Diff for: azure-region/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This module adds a parameter with all Azure regions, allowing developers to sele
1313

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

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

5759
```tf
5860
module "azure-region" {
61+
count = data.coder_workspace.me.start_count
5962
source = "registry.coder.com/modules/azure-region/coder"
6063
version = "1.0.12"
6164
exclude = [

Diff for: code-server/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Automatically install [code-server](https://github.com/coder/code-server) in a w
1313

1414
```tf
1515
module "code-server" {
16+
count = data.coder_workspace.me.start_count
1617
source = "registry.coder.com/modules/code-server/coder"
1718
version = "1.0.26"
1819
agent_id = coder_agent.example.id
@@ -27,6 +28,7 @@ module "code-server" {
2728

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

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

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

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

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

101107
```tf
102108
module "code-server" {
109+
count = data.coder_workspace.me.start_count
103110
source = "registry.coder.com/modules/code-server/coder"
104111
version = "1.0.26"
105112
agent_id = coder_agent.example.id

Diff for: coder-login/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Automatically logs the user into Coder when creating their workspace.
1313

1414
```tf
1515
module "coder-login" {
16+
count = data.coder_workspace.me.start_count
1617
source = "registry.coder.com/modules/coder-login/coder"
1718
version = "1.0.15"
1819
agent_id = coder_agent.example.id

Diff for: cursor/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Uses the [Coder Remote VS Code Extension](https://github.com/coder/cursor-coder)
1515

1616
```tf
1717
module "cursor" {
18+
count = data.coder_workspace.me.start_count
1819
source = "registry.coder.com/modules/cursor/coder"
1920
version = "1.0.19"
2021
agent_id = coder_agent.example.id
@@ -27,6 +28,7 @@ module "cursor" {
2728

2829
```tf
2930
module "cursor" {
31+
count = data.coder_workspace.me.start_count
3032
source = "registry.coder.com/modules/cursor/coder"
3133
version = "1.0.19"
3234
agent_id = coder_agent.example.id

Diff for: dotfiles/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Under the hood, this module uses the [coder dotfiles](https://coder.com/docs/v2/
1717

1818
```tf
1919
module "dotfiles" {
20+
count = data.coder_workspace.me.start_count
2021
source = "registry.coder.com/modules/dotfiles/coder"
2122
version = "1.0.18"
2223
agent_id = coder_agent.example.id
@@ -29,6 +30,7 @@ module "dotfiles" {
2930

3031
```tf
3132
module "dotfiles" {
33+
count = data.coder_workspace.me.start_count
3234
source = "registry.coder.com/modules/dotfiles/coder"
3335
version = "1.0.18"
3436
agent_id = coder_agent.example.id
@@ -39,6 +41,7 @@ module "dotfiles" {
3941

4042
```tf
4143
module "dotfiles" {
44+
count = data.coder_workspace.me.start_count
4245
source = "registry.coder.com/modules/dotfiles/coder"
4346
version = "1.0.18"
4447
agent_id = coder_agent.example.id
@@ -50,12 +53,14 @@ module "dotfiles" {
5053

5154
```tf
5255
module "dotfiles" {
56+
count = data.coder_workspace.me.start_count
5357
source = "registry.coder.com/modules/dotfiles/coder"
5458
version = "1.0.18"
5559
agent_id = coder_agent.example.id
5660
}
5761
5862
module "dotfiles-root" {
63+
count = data.coder_workspace.me.start_count
5964
source = "registry.coder.com/modules/dotfiles/coder"
6065
version = "1.0.18"
6166
agent_id = coder_agent.example.id
@@ -70,6 +75,7 @@ You can set a default dotfiles repository for all users by setting the `default_
7075

7176
```tf
7277
module "dotfiles" {
78+
count = data.coder_workspace.me.start_count
7379
source = "registry.coder.com/modules/dotfiles/coder"
7480
version = "1.0.18"
7581
agent_id = coder_agent.example.id

Diff for: exoscale-instance-type/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Customize the preselected parameter value:
1616

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

4546
```tf
4647
module "exoscale-instance-type" {
48+
count = data.coder_workspace.me.start_count
4749
source = "registry.coder.com/modules/exoscale-instance-type/coder"
4850
version = "1.0.12"
4951
default = "standard.medium"
@@ -78,6 +80,7 @@ Show only gpu1 types
7880

7981
```tf
8082
module "exoscale-instance-type" {
83+
count = data.coder_workspace.me.start_count
8184
source = "registry.coder.com/modules/exoscale-instance-type/coder"
8285
version = "1.0.12"
8386
default = "gpu.large"

Diff for: exoscale-zone/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Customize the preselected parameter value:
1616

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

4445
```tf
4546
module "exoscale-zone" {
47+
count = data.coder_workspace.me.start_count
4648
source = "registry.coder.com/modules/exoscale-zone/coder"
4749
version = "1.0.12"
4850
default = "at-vie-1"

Diff for: filebrowser/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ A file browser for your workspace.
1313

1414
```tf
1515
module "filebrowser" {
16+
count = data.coder_workspace.me.start_count
1617
source = "registry.coder.com/modules/filebrowser/coder"
1718
version = "1.0.23"
1819
agent_id = coder_agent.example.id
@@ -27,6 +28,7 @@ module "filebrowser" {
2728

2829
```tf
2930
module "filebrowser" {
31+
count = data.coder_workspace.me.start_count
3032
source = "registry.coder.com/modules/filebrowser/coder"
3133
version = "1.0.23"
3234
agent_id = coder_agent.example.id
@@ -38,6 +40,7 @@ module "filebrowser" {
3840

3941
```tf
4042
module "filebrowser" {
43+
count = data.coder_workspace.me.start_count
4144
source = "registry.coder.com/modules/filebrowser/coder"
4245
version = "1.0.23"
4346
agent_id = coder_agent.example.id
@@ -49,7 +52,9 @@ module "filebrowser" {
4952

5053
```tf
5154
module "filebrowser" {
55+
count = data.coder_workspace.me.start_count
5256
source = "registry.coder.com/modules/filebrowser/coder"
57+
version = "1.0.23"
5358
agent_id = coder_agent.example.id
5459
agent_name = "main"
5560
subdomain = false

Diff for: fly-region/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ We can use the simplest format here, only adding a default selection as the `atl
1515

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

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

4749
```tf
4850
module "fly-region" {
51+
count = data.coder_workspace.me.start_count
4952
source = "registry.coder.com/modules/fly-region/coder"
5053
version = "1.0.2"
5154
default = "ams"

Diff for: gcp-region/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This module adds Google Cloud Platform regions to your Coder template.
1313

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

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

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

6568
```tf
6669
module "gcp_region" {
70+
count = data.coder_workspace.me.start_count
6771
source = "registry.coder.com/modules/gcp-region/coder"
6872
version = "1.0.12"
6973
regions = ["us", "europe"]

0 commit comments

Comments
 (0)