github.com/iaas-resource-provision/iaas-rpc@v1.0.7-0.20211021023331-ed21f798c408/internal/command/testdata/validate-invalid/interpolation/output.json (about) 1 { 2 "format_version": "0.1", 3 "valid": false, 4 "error_count": 2, 5 "warning_count": 0, 6 "diagnostics": [ 7 { 8 "severity": "error", 9 "summary": "Variables not allowed", 10 "detail": "Variables may not be used here.", 11 "range": { 12 "filename": "testdata/validate-invalid/interpolation/main.tf", 13 "start": { 14 "line": 6, 15 "column": 16, 16 "byte": 122 17 }, 18 "end": { 19 "line": 6, 20 "column": 19, 21 "byte": 125 22 } 23 }, 24 "snippet": { 25 "context": "variable \"vairable_with_interpolation\"", 26 "code": " default = \"${var.otherresourcename}\"", 27 "start_line": 6, 28 "highlight_start_offset": 15, 29 "highlight_end_offset": 18, 30 "values": [] 31 } 32 }, 33 { 34 "severity": "error", 35 "summary": "Invalid expression", 36 "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.", 37 "range": { 38 "filename": "testdata/validate-invalid/interpolation/main.tf", 39 "start": { 40 "line": 10, 41 "column": 17, 42 "byte": 197 43 }, 44 "end": { 45 "line": 10, 46 "column": 44, 47 "byte": 224 48 } 49 }, 50 "snippet": { 51 "context": "resource \"aws_instance\" \"web\"", 52 "code": " depends_on = [\"${var.otherresourcename}}\"]", 53 "start_line": 10, 54 "highlight_start_offset": 16, 55 "highlight_end_offset": 43, 56 "values": [] 57 } 58 } 59 ] 60 }