◐ Shell
clean mode source ↗

feat: template builder backend fixes (DEVEX-287) by jeremyruppel · Pull Request #26432 · coder/coder

This was referenced

Jun 16, 2026

This was referenced

Jun 16, 2026
… declarations

Sensitive variable blocks in module .tf.tmpl files and the modulegen
script were missing default = "", causing terraform plan to prompt
for values during template import.
The backend now accepts raw string values from callers (e.g. "anthropic")
and wraps them in HCL quotes automatically via hclQuote(). Previously
callers were required to send pre-quoted HCL literals, which is not a
reasonable API contract for frontend consumers.

- validateStringValue now validates raw strings (rejects interpolation
  and overlong values)
- toHCLLiteral wraps string values in quotes with proper escaping
- hclQuote handles backslash, quote, newline, and carriage return escaping
- null is passed through unquoted for all types