6c4344623b
The main HCL package is more visible this way, and so it's easier than having to pick it out from dozens of other package directories.
51 lines
810 B
Go
51 lines
810 B
Go
package dynblock
|
|
|
|
import "github.com/hashicorp/hcl/v2"
|
|
|
|
var dynamicBlockHeaderSchema = hcl.BlockHeaderSchema{
|
|
Type: "dynamic",
|
|
LabelNames: []string{"type"},
|
|
}
|
|
|
|
var dynamicBlockBodySchemaLabels = &hcl.BodySchema{
|
|
Attributes: []hcl.AttributeSchema{
|
|
{
|
|
Name: "for_each",
|
|
Required: true,
|
|
},
|
|
{
|
|
Name: "iterator",
|
|
Required: false,
|
|
},
|
|
{
|
|
Name: "labels",
|
|
Required: true,
|
|
},
|
|
},
|
|
Blocks: []hcl.BlockHeaderSchema{
|
|
{
|
|
Type: "content",
|
|
LabelNames: nil,
|
|
},
|
|
},
|
|
}
|
|
|
|
var dynamicBlockBodySchemaNoLabels = &hcl.BodySchema{
|
|
Attributes: []hcl.AttributeSchema{
|
|
{
|
|
Name: "for_each",
|
|
Required: true,
|
|
},
|
|
{
|
|
Name: "iterator",
|
|
Required: false,
|
|
},
|
|
},
|
|
Blocks: []hcl.BlockHeaderSchema{
|
|
{
|
|
Type: "content",
|
|
LabelNames: nil,
|
|
},
|
|
},
|
|
}
|