Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7a906b7

Browse files
docs: add optional installation script and enhance resource configuration in module guide
1 parentb102e69 commit7a906b7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎docs/about/contributing/modules.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ module "code-server" {
181181
```text
182182
my-module/
183183
├── main.tf # Terraform configuration
184+
├── run.sh # Installation/setup script (optional but recommended)
184185
├── README.md # Documentation with frontmatter
185186
└── main.test.ts # Test suite
186187
```
@@ -212,8 +213,13 @@ variable "port" {
212213
data "coder_workspace" "me" {}
213214
214215
resource "coder_script" "install" {
215-
agent_id = var.agent_id
216-
script = "#!/bin/bash\necho 'Installing service...'"
216+
agent_id = var.agent_id
217+
display_name = "Install Service"
218+
icon = "/icon/service.svg"
219+
script = templatefile("${path.module}/run.sh", {
220+
PORT = var.port
221+
})
222+
run_on_start = true
217223
}
218224
219225
resource "coder_app" "service" {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp