Skip to content

Commit bc0c4eb

Browse files
chore(dogfood): add back coder envbuilder template (coder#20576)
I've given the CI dev.coder user Admin on the template, and tested the template still builds a workspace.
1 parent dc27761 commit bc0c4eb

File tree

1 file changed

+51
-47
lines changed

1 file changed

+51
-47
lines changed

dogfood/main.tf

Lines changed: 51 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ terraform {
99
}
1010
}
1111

12+
import {
13+
to = coderd_template.envbuilder_dogfood
14+
id = "e75f1212-834c-4183-8bed-d6817cac60a5"
15+
}
16+
1217
data "coderd_organization" "default" {
1318
is_default = true
1419
}
@@ -87,50 +92,49 @@ resource "coderd_template" "dogfood" {
8792
time_til_dormant_ms = 8640000000
8893
}
8994

90-
# Disabled for now until we restore the deleted template.
91-
# My bad - Dean
92-
#resource "coderd_template" "envbuilder_dogfood" {
93-
# name = "coder-envbuilder"
94-
# display_name = "Write Coder on Coder using Envbuilder"
95-
# description = "Write Coder on Coder using a workspace built by Envbuilder."
96-
# icon = "/emojis/1f3d7.png" # 🏗️
97-
# organization_id = data.coderd_organization.default.id
98-
# versions = [
99-
# {
100-
# name = var.CODER_TEMPLATE_VERSION
101-
# message = var.CODER_TEMPLATE_MESSAGE
102-
# directory = "./coder-envbuilder"
103-
# active = true
104-
# tf_vars = [{
105-
# # clusters/dogfood-v2/coder/provisioner/configs/values.yaml#L191-L194
106-
# name = "envbuilder_cache_dockerconfigjson_path"
107-
# value = "/home/coder/envbuilder-cache-dockerconfig.json"
108-
# }]
109-
# }
110-
# ]
111-
# acl = {
112-
# groups = [{
113-
# id = data.coderd_organization.default.id
114-
# role = "use"
115-
# }]
116-
# users = [{
117-
# id = data.coderd_user.machine.id
118-
# role = "admin"
119-
# }]
120-
# }
121-
# activity_bump_ms = 10800000
122-
# allow_user_auto_start = true
123-
# allow_user_auto_stop = true
124-
# allow_user_cancel_workspace_jobs = false
125-
# auto_start_permitted_days_of_week = ["friday", "monday", "saturday", "sunday", "thursday", "tuesday", "wednesday"]
126-
# auto_stop_requirement = {
127-
# days_of_week = ["sunday"]
128-
# weeks = 1
129-
# }
130-
# default_ttl_ms = 28800000
131-
# deprecation_message = null
132-
# failure_ttl_ms = 604800000
133-
# require_active_version = true
134-
# time_til_dormant_autodelete_ms = 7776000000
135-
# time_til_dormant_ms = 8640000000
136-
#}
95+
96+
resource "coderd_template" "envbuilder_dogfood" {
97+
name = "coder-envbuilder"
98+
display_name = "Write Coder on Coder using Envbuilder"
99+
description = "Write Coder on Coder using a workspace built by Envbuilder."
100+
icon = "/emojis/1f3d7.png" # 🏗️
101+
organization_id = data.coderd_organization.default.id
102+
versions = [
103+
{
104+
name = var.CODER_TEMPLATE_VERSION
105+
message = var.CODER_TEMPLATE_MESSAGE
106+
directory = "./coder-envbuilder"
107+
active = true
108+
tf_vars = [{
109+
# clusters/dogfood-v2/coder/provisioner/configs/values.yaml#L191-L194
110+
name = "envbuilder_cache_dockerconfigjson_path"
111+
value = "/home/coder/envbuilder-cache-dockerconfig.json"
112+
}]
113+
}
114+
]
115+
acl = {
116+
groups = [{
117+
id = data.coderd_organization.default.id
118+
role = "use"
119+
}]
120+
users = [{
121+
id = data.coderd_user.machine.id
122+
role = "admin"
123+
}]
124+
}
125+
activity_bump_ms = 10800000
126+
allow_user_auto_start = true
127+
allow_user_auto_stop = true
128+
allow_user_cancel_workspace_jobs = false
129+
auto_start_permitted_days_of_week = ["friday", "monday", "saturday", "sunday", "thursday", "tuesday", "wednesday"]
130+
auto_stop_requirement = {
131+
days_of_week = ["sunday"]
132+
weeks = 1
133+
}
134+
default_ttl_ms = 28800000
135+
deprecation_message = null
136+
failure_ttl_ms = 604800000
137+
require_active_version = true
138+
time_til_dormant_autodelete_ms = 7776000000
139+
time_til_dormant_ms = 8640000000
140+
}

0 commit comments

Comments
 (0)