2020-12-11 19:09:25 +01:00
|
|
|
{
|
2021-03-16 14:46:36 +01:00
|
|
|
"format_version": "0.1",
|
2020-12-11 19:09:25 +01:00
|
|
|
"valid": false,
|
2021-05-07 18:28:09 +02:00
|
|
|
"error_count": 4,
|
2021-02-19 16:27:09 +01:00
|
|
|
"warning_count": 0,
|
2020-12-11 19:09:25 +01:00
|
|
|
"diagnostics": [
|
|
|
|
{
|
|
|
|
"severity": "error",
|
|
|
|
"summary": "Missing required argument",
|
|
|
|
"detail": "The argument \"source\" is required, but no definition was found.",
|
|
|
|
"range": {
|
|
|
|
"filename": "testdata/validate-invalid/incorrectmodulename/main.tf",
|
|
|
|
"start": {
|
|
|
|
"line": 1,
|
|
|
|
"column": 23,
|
|
|
|
"byte": 22
|
|
|
|
},
|
|
|
|
"end": {
|
|
|
|
"line": 1,
|
2021-03-11 18:57:07 +01:00
|
|
|
"column": 24,
|
|
|
|
"byte": 23
|
2020-12-11 19:09:25 +01:00
|
|
|
}
|
2021-03-11 18:57:07 +01:00
|
|
|
},
|
|
|
|
"snippet": {
|
|
|
|
"context": "module \"super#module\"",
|
|
|
|
"code": "module \"super#module\" {",
|
|
|
|
"start_line": 1,
|
|
|
|
"highlight_start_offset": 22,
|
|
|
|
"highlight_end_offset": 23,
|
|
|
|
"values": []
|
2020-12-11 19:09:25 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"severity": "error",
|
|
|
|
"summary": "Invalid module instance name",
|
|
|
|
"detail": "A name must start with a letter or underscore and may contain only letters, digits, underscores, and dashes.",
|
|
|
|
"range": {
|
|
|
|
"filename": "testdata/validate-invalid/incorrectmodulename/main.tf",
|
|
|
|
"start": {
|
|
|
|
"line": 1,
|
|
|
|
"column": 8,
|
|
|
|
"byte": 7
|
|
|
|
},
|
|
|
|
"end": {
|
|
|
|
"line": 1,
|
|
|
|
"column": 22,
|
|
|
|
"byte": 21
|
|
|
|
}
|
2021-03-11 18:57:07 +01:00
|
|
|
},
|
|
|
|
"snippet": {
|
|
|
|
"context": "module \"super#module\"",
|
|
|
|
"code": "module \"super#module\" {",
|
|
|
|
"start_line": 1,
|
|
|
|
"highlight_start_offset": 7,
|
|
|
|
"highlight_end_offset": 21,
|
|
|
|
"values": []
|
2020-12-11 19:09:25 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2021-02-19 16:27:09 +01:00
|
|
|
"severity": "error",
|
|
|
|
"summary": "Variables not allowed",
|
|
|
|
"detail": "Variables may not be used here.",
|
2020-12-11 19:09:25 +01:00
|
|
|
"range": {
|
|
|
|
"filename": "testdata/validate-invalid/incorrectmodulename/main.tf",
|
|
|
|
"start": {
|
|
|
|
"line": 5,
|
|
|
|
"column": 12,
|
|
|
|
"byte": 55
|
|
|
|
},
|
|
|
|
"end": {
|
|
|
|
"line": 5,
|
|
|
|
"column": 15,
|
|
|
|
"byte": 58
|
|
|
|
}
|
2021-03-11 18:57:07 +01:00
|
|
|
},
|
|
|
|
"snippet": {
|
|
|
|
"context": "module \"super\"",
|
|
|
|
"code": " source = var.modulename",
|
|
|
|
"start_line": 5,
|
|
|
|
"highlight_start_offset": 11,
|
|
|
|
"highlight_end_offset": 14,
|
|
|
|
"values": []
|
2020-12-11 19:09:25 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"severity": "error",
|
|
|
|
"summary": "Unsuitable value type",
|
|
|
|
"detail": "Unsuitable value: value must be known",
|
|
|
|
"range": {
|
|
|
|
"filename": "testdata/validate-invalid/incorrectmodulename/main.tf",
|
|
|
|
"start": {
|
|
|
|
"line": 5,
|
|
|
|
"column": 12,
|
|
|
|
"byte": 55
|
|
|
|
},
|
|
|
|
"end": {
|
|
|
|
"line": 5,
|
2021-02-19 16:27:09 +01:00
|
|
|
"column": 26,
|
|
|
|
"byte": 69
|
2020-12-11 19:09:25 +01:00
|
|
|
}
|
2021-03-11 18:57:07 +01:00
|
|
|
},
|
|
|
|
"snippet": {
|
|
|
|
"context": "module \"super\"",
|
|
|
|
"code": " source = var.modulename",
|
|
|
|
"start_line": 5,
|
|
|
|
"highlight_start_offset": 11,
|
|
|
|
"highlight_end_offset": 25,
|
|
|
|
"values": []
|
2020-12-11 19:09:25 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|