Debian Codegraph @

tfconfig/testdata/legacy-block-labels/legacy-block-labels.tf

raw
1 # Although we never documented it as being good style, the legacy HCL parser
2 # allowed block labels to be unquoted if they were valid identifiers.
3 #
4 # Since there may be modules in the wild that rely on this, we support it
5 # through fallback to the legacy HCL parser, which should then be able
6 # to give us similar information as we'd get from the newer HCL parser, albeit
7 # with less accuracy in source locations and other such rough edges that
8 # the old parser implies.
9
10 terraform {
11 required_version = ">= 0.11.0"
12
13 backend "s3" {
14 # This is ignored but included to make sure we do ignore it successfully
15 foo = "bar"
16 }
17 ignored = 1
18 }
19
20 provider aws {
21 version = "1.0.0"
22 ignored = 1
23 }
24
25 provider noversion {
26 ignored = 1
27 }
28
29 variable foo {
30 description = "foo description"
31 default = "foo default"
32 ignored = 1
33 }
34
35 output foo {
36 description = "foo description"
37 sensitive = true
38 ignored = 1
39 }
40
41 resource null_resource foo {
42 ignored = 1
43 provider = "notnull.baz"
44 }
45
46 data external foo {
47 ignored = 1
48 }
49
50 module foo {
51 source = "foo/bar/baz"
52 version = "1.2.3"
53 }