Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
address PR comments
  • Loading branch information
johnstcn committed Mar 11, 2025
commit bda4920e16e140f2485a9255b94f0b7ba75cb01b
2 changes: 1 addition & 1 deletion .github/workflows/dogfood.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ jobs:
CODER_URL: https://dev.coder.com
CODER_SESSION_TOKEN: ${{ secrets.CODER_SESSION_TOKEN }}
# Template source & details
TF_VAR_CODER_TEMPLATE_NAME: "${{ secrets.CODER_TEMPLATE_NAME }}-envbuilder"
TF_VAR_CODER_TEMPLATE_VERSION: ${{ steps.vars.outputs.sha_short }}
TF_VAR_CODER_TEMPLATE_DIR: ./contents
TF_VAR_CODER_TEMPLATE_MESSAGE: ${{ steps.message.outputs.pr_title }}
TF_LOG: info
2 changes: 1 addition & 1 deletion dogfood/coder-envbuilder/contents/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ data "coder_parameter" "devcontainer_repo" {
data "coder_parameter" "devcontainer_dir" {
type = "string"
name = "Devcontainer Directory"
default = "dogfood/contents/"
default = "dogfood/coder/contents/"
description = "Directory containing a devcontainer.json relative to the repository root"
mutable = true
}
Expand Down
79 changes: 0 additions & 79 deletions dogfood/coder-envbuilder/main.tf

This file was deleted.

55 changes: 51 additions & 4 deletions dogfood/coder/main.tf → dogfood/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ terraform {
source = "coder/coderd"
}
}
backend "gcs" {
bucket = "coder-dogfood-tf-state"
}
# backend "gcs" {
# bucket = "coder-dogfood-tf-state"
# }
}

data "coderd_organization" "default" {
Expand Down Expand Up @@ -43,8 +43,55 @@ resource "coderd_template" "dogfood" {
{
name = var.CODER_TEMPLATE_VERSION
message = var.CODER_TEMPLATE_MESSAGE
directory = var.CODER_TEMPLATE_DIR
directory = "./coder/contents"
active = true
}
]
acl = {
groups = [{
id = data.coderd_organization.default.id
role = "use"
}]
users = [{
id = data.coderd_user.machine.id
role = "admin"
}]
}
activity_bump_ms = 10800000
allow_user_auto_start = true
allow_user_auto_stop = true
allow_user_cancel_workspace_jobs = false
auto_start_permitted_days_of_week = ["friday", "monday", "saturday", "sunday", "thursday", "tuesday", "wednesday"]
auto_stop_requirement = {
days_of_week = ["sunday"]
weeks = 1
}
default_ttl_ms = 28800000
deprecation_message = null
failure_ttl_ms = 604800000
require_active_version = true
time_til_dormant_autodelete_ms = 7776000000
time_til_dormant_ms = 8640000000
}


resource "coderd_template" "envbuilder_dogfood" {
name = "coder-envbuilder"
display_name = "Write Coder on Coder using Envbuilder"
description = "Write Coder on Coder using a workspace built by Envbuilder."
icon = "/emojis/1f3d7.png" # 🏗️
organization_id = "703f72a1-76f6-4f89-9de6-8a3989693fe5"
versions = [
{
name = var.CODER_TEMPLATE_VERSION
message = var.CODER_TEMPLATE_MESSAGE
directory = "./coder-envbuilder/contents"
active = true
tf_vars = [{
# clusters/dogfood-v2/coder/provisioner/configs/values.yaml#L191-L194
name = "envbuilder_cache_dockerconfigjson_path"
value = "/home/coder/envbuilder-cache-dockerconfig.json"
}]
}
]
acl = {
Expand Down