diff options
Diffstat (limited to 'vendor/github.com/hashicorp/hcl2/ext/dynblock/schema.go')
-rw-r--r-- | vendor/github.com/hashicorp/hcl2/ext/dynblock/schema.go | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/hcl2/ext/dynblock/schema.go b/vendor/github.com/hashicorp/hcl2/ext/dynblock/schema.go new file mode 100644 index 0000000..dc8ed5a --- /dev/null +++ b/vendor/github.com/hashicorp/hcl2/ext/dynblock/schema.go | |||
@@ -0,0 +1,50 @@ | |||
1 | package dynblock | ||
2 | |||
3 | import "github.com/hashicorp/hcl2/hcl" | ||
4 | |||
5 | var dynamicBlockHeaderSchema = hcl.BlockHeaderSchema{ | ||
6 | Type: "dynamic", | ||
7 | LabelNames: []string{"type"}, | ||
8 | } | ||
9 | |||
10 | var dynamicBlockBodySchemaLabels = &hcl.BodySchema{ | ||
11 | Attributes: []hcl.AttributeSchema{ | ||
12 | { | ||
13 | Name: "for_each", | ||
14 | Required: true, | ||
15 | }, | ||
16 | { | ||
17 | Name: "iterator", | ||
18 | Required: false, | ||
19 | }, | ||
20 | { | ||
21 | Name: "labels", | ||
22 | Required: true, | ||
23 | }, | ||
24 | }, | ||
25 | Blocks: []hcl.BlockHeaderSchema{ | ||
26 | { | ||
27 | Type: "content", | ||
28 | LabelNames: nil, | ||
29 | }, | ||
30 | }, | ||
31 | } | ||
32 | |||
33 | var dynamicBlockBodySchemaNoLabels = &hcl.BodySchema{ | ||
34 | Attributes: []hcl.AttributeSchema{ | ||
35 | { | ||
36 | Name: "for_each", | ||
37 | Required: true, | ||
38 | }, | ||
39 | { | ||
40 | Name: "iterator", | ||
41 | Required: false, | ||
42 | }, | ||
43 | }, | ||
44 | Blocks: []hcl.BlockHeaderSchema{ | ||
45 | { | ||
46 | Type: "content", | ||
47 | LabelNames: nil, | ||
48 | }, | ||
49 | }, | ||
50 | } | ||