8000 Invalid terraform template variable definitions return a cryptic error · Issue #1583 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content
Invalid terraform template variable definitions return a cryptic error #1583
Closed
@deansheather

Description

@deansheather

OS Information

  • OS: Linux
  • Architecture: amd64
  • coder --version: Coder v0.0.0-devel+c034e83 Wed May 18 23:15:19 UTC 2022
    c034e83

Steps to Reproduce

  1. Observe that the disk_size variable in the aws-linux example template has a default of 20
  2. Edit the default to ""
  3. Try to create the template and get an error at the "detecting persistent resources" step: template import provision for start: recv import provision: initialize terraform: configuration is invalid
  4. Edit the default to "asdf"
  5. Try to create the template and get the same error
  6. Edit the default value to any valid number e.g. 1000
  7. Try to create the template
  8. No error

Expected

If template authors set a default to an invalid value (e.g. they put letters in the default of a field with type = number) they should get a sensible error message.

Actual

Evil error message

Logs

Screenshot

image

Notes

Hopefully terraform is spitting out an error that we're just not displaying correctly, otherwise this will be hellish to fix.

Dean: Run terraform validate before the plan in the template import job.

Metadata

Metadata

Assignees

Labels

apiArea: HTTP API

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0