Title: Invalid terraform template variable definitions return a cryptic error · Issue #1583 · coder/coder · GitHub
Open Graph Title: Invalid terraform template variable definitions return a cryptic error · Issue #1583 · coder/coder
X Title: Invalid terraform template variable definitions return a cryptic error · Issue #1583 · coder/coder
Description: 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 Observe that the disk_size variable in the aws-linux example template has a default of 20 Ed...
Open Graph Description: 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 Observe that the disk_size variable in the aws-linux...
X Description: 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 Observe that the disk_size variable in the aws-linux...
Opengraph URL: https://github.com/coder/coder/issues/1583
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Invalid terraform template variable definitions return a cryptic error","articleBody":"## OS Information\r\n\r\n- OS: Linux\r\n- Architecture: amd64\r\n- `coder --version`: Coder v0.0.0-devel+c034e83 Wed May 18 23:15:19 UTC 2022\r\nhttps://github.com/coder/coder/commit/c034e8389e85a9e597fe8043975c25e95d836a33\r\n\r\n## Steps to Reproduce\r\n\r\n1. Observe that the `disk_size` variable in the `aws-linux` example template has a default of `20`\r\n2. Edit the default to `\"\"`\r\n3. 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`\r\n4. Edit the default to \"asdf\"\r\n5. Try to create the template and get the same error\r\n6. Edit the default value to any valid number e.g. 1000\r\n7. Try to create the template\r\n8. No error\r\n\r\n## Expected\r\n\r\nIf 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.\r\n\r\n## Actual\r\n\r\nEvil error message\r\n\r\n## Logs\r\n\r\n## Screenshot\r\n\r\n\r\n\r\n## Notes\r\n\r\nHopefully terraform is spitting out an error that we're just not displaying correctly, otherwise this will be hellish to fix.\r\n\r\n\r\nDean: Run terraform validate before the plan in the template import job. ","author":{"url":"https://github.com/deansheather","@type":"Person","name":"deansheather"},"datePublished":"2022-05-19T07:52:33Z","url":"https://github.com/coder/coder/issues/1583"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b9e4824a-5add-aba9-4952-dc76846814d4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8FCA:F7C4C:1DF7145:280FF04:6B0176B5 |
| html-safe-nonce | e09dfae2025fde33eeab614cb2bf3015f480cfadb1e896bb109fb4d473e3af6f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkNBOkY3QzRDOjFERjcxNDU6MjgwRkYwNDo2QjAxNzZCNSIsInZpc2l0b3JfaWQiOiI4NzQ0Njc1NjgxMjg1MjczMjY5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6fa87cb4de545b75b3c210dfa782a139fc49b191aa2071228119999ba35e16f9 |
| hovercard-subject-tag | issue:1241375081 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/1583/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8838c8c1943471fa28cfa470f70bc9f913933f9bec3f869458b0d34b42ee463c/coder/coder/issues/1583 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8838c8c1943471fa28cfa470f70bc9f913933f9bec3f869458b0d34b42ee463c/coder/coder/issues/1583 |
| og:image:alt | 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 Observe that the disk_size variable in the aws-linux... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | deansheather |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width