🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

feat: add base template variables to API - #26425

Merged
jeremyruppel merged 2 commits into
mainfrom
jeremy/devex-284-be-base-template-variables
Jun 17, 2026
Merged

feat: add base template variables to API#26425
jeremyruppel merged 2 commits into
mainfrom
jeremy/devex-284-be-base-template-variables

Conversation

@jeremyruppel

@jeremyruppel jeremyruppel commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Add backend support for base template variables in the template builder, enabling the frontend to render configuration forms for bases like Kubernetes that declare Terraform variables.

  • Add Variables []ModuleVariable to BaseManifest and BaseVariables() accessor
  • Add variables to the Kubernetes base manifest (use_kubeconfig, namespace)
  • Add Variables field to codersdk.TemplateBuilderBase response type
  • Add BaseVariableValues to TemplateBuilderComposeRequest and TemplateBuilderCreateTemplateRequest
  • Thread base variable values through the compose pipeline into BaseRenderContext
  • Restructure TestTemplateBuilderBases/OK as table-driven specs with per-base variable assertions

Docker and AWS bases have no user-configurable Terraform variables and remain empty.

Relates to DEVEX-284.

Note

This PR was authored with Coder Agents.

@linear-code

linear-code Bot commented Jun 16, 2026

Copy link
Copy Markdown

DEVEX-284

@github-actions

Copy link
Copy Markdown

Docs preview

📖 View docs preview for docs/reference/api/schemas.md

@jeremyruppel
jeremyruppel marked this pull request as ready for review June 16, 2026 17:50
@jeremyruppel jeremyruppel changed the title feat(coderd/templatebuilder): add base template variables to API feat: add base template variables to API Jun 16, 2026
@jeremyruppel
jeremyruppel force-pushed the jeremy/devex-283-fe-baseinfraselectstep branch from 68ca05a to d046b0f Compare June 16, 2026 20:42
@jeremyruppel
jeremyruppel force-pushed the jeremy/devex-284-be-base-template-variables branch from d34528f to 7fa30b7 Compare June 16, 2026 20:42

@zenithwolf1000 zenithwolf1000 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor idiomatic nit otherwise lgtm

Comment thread coderd/templatebuilder/compose.go Outdated
Base automatically changed from jeremy/devex-283-fe-baseinfraselectstep to main June 17, 2026 15:51
Add support for base template variables in the template builder:

- Add Variables field to BaseManifest, reusing ModuleVariable
- Add variables to kubernetes base.json (use_kubeconfig, namespace)
- Add Variables to codersdk.TemplateBuilderBase
- Add BaseVariableValues to compose and create-template requests
- Thread base variable values through the compose pipeline into
  BaseRenderContext
- Add baseVariablesToSDK helper in handler to convert and filter
  computed variables
- Restructure TestTemplateBuilderBases/OK as table-driven specs
  with per-base variable assertions
- Regenerate TypeScript types and API docs
@jeremyruppel
jeremyruppel force-pushed the jeremy/devex-284-be-base-template-variables branch from 7fa30b7 to c805e35 Compare June 17, 2026 15:59
@jeremyruppel
jeremyruppel merged commit 87de6dc into main Jun 17, 2026
30 of 32 checks passed
@jeremyruppel
jeremyruppel deleted the jeremy/devex-284-be-base-template-variables branch June 17, 2026 16:22
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants