File: legacy-block-labels.tf

package info (click to toggle)
golang-github-hashicorp-terraform-config-inspect 0.0~git20230614.f32df32-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 472 kB
  • sloc: makefile: 2
file content (53 lines) | stat: -rw-r--r-- 1,089 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Although we never documented it as being good style, the legacy HCL parser
# allowed block labels to be unquoted if they were valid identifiers.
#
# Since there may be modules in the wild that rely on this, we support it
# through fallback to the legacy HCL parser, which should then be able
# to give us similar information as we'd get from the newer HCL parser, albeit
# with less accuracy in source locations and other such rough edges that
# the old parser implies.

terraform {
  required_version = ">= 0.11.0"

  backend "s3" {
    # This is ignored but included to make sure we do ignore it successfully
    foo = "bar"
  }
  ignored = 1
}

provider aws {
  version = "1.0.0"
  ignored = 1
}

provider noversion {
  ignored = 1
}

variable foo {
  description = "foo description"
  default     = "foo default"
  ignored = 1
}

output foo {
  description = "foo description"
  sensitive = true
  ignored = 1
}

resource null_resource foo {
  ignored = 1
  provider = "notnull.baz"
}

data external foo {
  ignored = 1
}

module foo {
  source = "foo/bar/baz"
  version = "1.2.3"
}