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

Commit67932bf

Browse files
committed
use provider
1 parentdb2287d commit67932bf

File tree

2 files changed

+73
-8
lines changed

2 files changed

+73
-8
lines changed

‎.github/workflows/dogfood.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ jobs:
8787

8888
-name:Terraform init and validate
8989
run:|
90-
cd dogfood/contents
90+
cd dogfood
91+
terraform init -upgrade
92+
terraform validate
93+
cd contents
9194
terraform init -upgrade
9295
terraform validate
9396
@@ -110,7 +113,7 @@ jobs:
110113
CODER_URL:https://dev.coder.com
111114
CODER_SESSION_TOKEN:${{ secrets.CODER_SESSION_TOKEN }}
112115
# Template source & details
113-
CODER_TEMPLATE_NAME:${{ secrets.CODER_TEMPLATE_NAME }}
114-
CODER_TEMPLATE_VERSION:${{ steps.vars.outputs.sha_short }}
115-
CODER_TEMPLATE_DIR:./dogfood
116-
CODER_TEMPLATE_MESSAGE:${{ steps.message.outputs.pr_title }}
116+
TF_VAR_coder_template_name:${{ secrets.CODER_TEMPLATE_NAME }}
117+
TF_VAR_coder_template_version:${{ steps.vars.outputs.sha_short }}
118+
TF_VAR_coder_template_dir:./dogfood
119+
TF_VAR_coder_template_message:${{ steps.message.outputs.pr_title }}

‎dogfood/main.tf

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,72 @@
11
terraform {
22
required_providers {
33
coderd={
4-
source="coder/coderd"
5-
version=">=0.0.0"
4+
source="coder/coderd"
65
}
76
}
87
}
98

10-
provider"coderd" {}
9+
data"coderd_organization""default" {
10+
is_default=true
11+
}
12+
13+
data"coderd_user""machine" {
14+
username="machine"
15+
}
16+
17+
variable"coder_template_name" {
18+
type=string
19+
}
20+
21+
variable"coder_template_version" {
22+
type=string
23+
}
24+
25+
variable"coder_template_dir" {
26+
type=string
27+
}
28+
29+
variable"coder_template_message" {
30+
type=string
31+
}
32+
33+
resource"coderd_template""dogfood" {
34+
name=var.coder_template_name
35+
display_name="Write Coder on Coder"
36+
description="The template to use when developing Coder on Coder!"
37+
icon="/emojis/1f3c5.png"
38+
organization_id="703f72a1-76f6-4f89-9de6-8a3989693fe5"
39+
versions=[
40+
{
41+
name= var.coder_template_version
42+
message= var.coder_template_message
43+
directory= var.coder_template_dir
44+
active=true
45+
}
46+
]
47+
acl={
48+
groups= [{
49+
id= data.coderd_organization.default.id
50+
role="use"
51+
}]
52+
users= [{
53+
id= data.coderd_user.machine.id
54+
role="admin"
55+
}]
56+
}
57+
activity_bump_ms=10800000
58+
allow_user_auto_start=true
59+
allow_user_auto_stop=true
60+
allow_user_cancel_workspace_jobs=false
61+
auto_start_permitted_days_of_week=["friday","monday","saturday","sunday","thursday","tuesday","wednesday"]
62+
auto_stop_requirement={
63+
days_of_week= ["sunday"]
64+
weeks=1
65+
}
66+
default_ttl_ms=28800000
67+
deprecation_message=null
68+
failure_ttl_ms=604800000
69+
require_active_version=true
70+
time_til_dormant_autodelete_ms=7776000000
71+
time_til_dormant_ms=8640000000
72+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp