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

fix: render base variables into templates instead of tfvars (DEVEX-287) - #26436

Merged
jeremyruppel merged 1 commit into
mainfrom
jeremy/devex-287-be-base-variable-rendering
Jun 23, 2026
Merged

fix: render base variables into templates instead of tfvars (DEVEX-287)#26436
jeremyruppel merged 1 commit into
mainfrom
jeremy/devex-287-be-base-variable-rendering

Conversation

@jeremyruppel

Copy link
Copy Markdown
Contributor

Part of the Template Builder wizard PR stack.

Problem

The kubernetes base template used Terraform variable blocks and var.* references for use_kubeconfig and namespace, but the composed tar bundle never included a .tfvars file. This caused terraform plan to fail with "required template variables need values: namespace".

Fix

Base templates now use Go template variables ({{ .Variables.* }}) just like module templates do. Values are validated, HCL-quoted, and rendered directly into the output HCL.

Also adds explicit "variable is required" validation to both mergeBaseVariables and mergeModuleVariables, replacing the previous reliance on missingkey=error at render time for clearer error messages.


Note

Generated by Coder Agents on behalf of @jeremyruppel

@jeremyruppel
jeremyruppel changed the base branch from jeremy/devex-287-fe-templatecustomizationsstep to graphite-base/26436 June 16, 2026 21:31
@linear-code

linear-code Bot commented Jun 16, 2026

Copy link
Copy Markdown

DEVEX-287

@jeremyruppel
jeremyruppel changed the base branch from jeremy/devex-287-be-template-builder-fixes to jeremy/devex-287-fe-templatecustomizationsstep June 16, 2026 21:32
@jeremyruppel
jeremyruppel changed the base branch from jeremy/devex-287-fe-templatecustomizationsstep to graphite-base/26436 June 16, 2026 21:32
@jeremyruppel
jeremyruppel force-pushed the graphite-base/26436 branch from 1adc078 to 9ec0473 Compare June 16, 2026 21:32
@jeremyruppel
jeremyruppel changed the base branch from graphite-base/26436 to jeremy/devex-287-be-template-builder-fixes June 16, 2026 21:32
@jeremyruppel
jeremyruppel changed the base branch from jeremy/devex-287-be-template-builder-fixes to jeremy/devex-287-fe-templatecustomizationsstep June 16, 2026 21:33
@jeremyruppel
jeremyruppel changed the base branch from jeremy/devex-287-fe-templatecustomizationsstep to graphite-base/26436 June 16, 2026 21:33
@jeremyruppel
jeremyruppel force-pushed the graphite-base/26436 branch from 1adc078 to 9ec0473 Compare June 16, 2026 21:33
@jeremyruppel
jeremyruppel changed the base branch from graphite-base/26436 to jeremy/devex-287-be-template-builder-fixes June 16, 2026 21:33
@jeremyruppel
jeremyruppel force-pushed the jeremy/devex-287-be-base-variable-rendering branch from cc6db20 to d5d8096 Compare June 16, 2026 21:35
@jeremyruppel
jeremyruppel force-pushed the jeremy/devex-287-be-template-builder-fixes branch from 9ec0473 to df0f468 Compare June 17, 2026 15:59
@jeremyruppel
jeremyruppel force-pushed the jeremy/devex-287-be-base-variable-rendering branch from d5d8096 to 94c6e2c Compare June 17, 2026 15:59
@jeremyruppel
jeremyruppel marked this pull request as ready for review June 17, 2026 16:36
@jeremyruppel
jeremyruppel force-pushed the jeremy/devex-287-be-template-builder-fixes branch from df0f468 to e41a23d Compare June 17, 2026 18:58
@jeremyruppel
jeremyruppel force-pushed the jeremy/devex-287-be-base-variable-rendering branch 2 times, most recently from 77ae6b6 to e0a04c0 Compare June 18, 2026 13:43
@jeremyruppel
jeremyruppel force-pushed the jeremy/devex-287-be-template-builder-fixes branch from e41a23d to 6589566 Compare June 18, 2026 13:43
@jeremyruppel
jeremyruppel changed the base branch from jeremy/devex-287-be-template-builder-fixes to graphite-base/26436 June 18, 2026 13:52
@jeremyruppel
jeremyruppel changed the base branch from graphite-base/26436 to jeremy/devex-287-fe-templatecustomizationsstep June 18, 2026 13:52
@jeremyruppel
jeremyruppel force-pushed the jeremy/devex-287-fe-templatecustomizationsstep branch 2 times, most recently from 68b1a19 to 5fbde20 Compare June 23, 2026 14:03
Base automatically changed from jeremy/devex-287-fe-templatecustomizationsstep to main June 23, 2026 14:23
…tead of tfvars

The kubernetes base template used Terraform variable blocks and var.*
references for use_kubeconfig and namespace, but the composed tar bundle
never included a .tfvars file, so terraform plan failed with 'required
template variables need values'.

Fix: base templates now use Go template variables ({{ .Variables.* }})
like module templates do. renderBase() validates and HCL-quotes base
variable values via mergeBaseVariables(). DefaultBaseRenderContext()
populates default variable values from the manifest.

Also adds explicit 'variable is required' validation to both
mergeBaseVariables and mergeModuleVariables, replacing the previous
reliance on missingkey=error at render time.
@jeremyruppel
jeremyruppel force-pushed the jeremy/devex-287-be-base-variable-rendering branch from e0a04c0 to 342778b Compare June 23, 2026 14:36
@jeremyruppel
jeremyruppel merged commit 7ea5d48 into main Jun 23, 2026
30 of 33 checks passed
@jeremyruppel
jeremyruppel deleted the jeremy/devex-287-be-base-variable-rendering branch June 23, 2026 15:26
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 23, 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