Files
opentf/command/testdata/validate-invalid/interpolation/output.json
Alisdair McDiarmid f1b95788b9 command: Add tests for terraform validate -json
Also uncomment and fix some tests which had been skipped for a couple of
years. Those validate cases work now!

Note that these test cases and the JSON output are not especially
minimized, making them snapshot/golden tests. The output looks correct
at time of writing, and we don't expect to change validate significantly
any time soon, but if we do there will be some churn here.
2020-12-11 13:09:25 -05:00

44 lines
1.0 KiB
JSON

{
"valid": false,
"error_count": 2,
"warning_count": 0,
"diagnostics": [
{
"severity": "error",
"summary": "Variables not allowed",
"detail": "Variables may not be used here.",
"range": {
"filename": "testdata/validate-invalid/interpolation/main.tf",
"start": {
"line": 6,
"column": 16,
"byte": 122
},
"end": {
"line": 6,
"column": 19,
"byte": 125
}
}
},
{
"severity": "error",
"summary": "Invalid expression",
"detail": "A single static variable reference is required: only attribute access and indexing with constant keys. No calculations, function calls, template expressions, etc are allowed here.",
"range": {
"filename": "testdata/validate-invalid/interpolation/main.tf",
"start": {
"line": 10,
"column": 17,
"byte": 197
},
"end": {
"line": 10,
"column": 44,
"byte": 224
}
}
}
]
}