3327dee567
This is in preparation for the first v2 release from the main HCL repository.
51 lines
814 B
Go
51 lines
814 B
Go
package dynblock
|
|
|
|
import "github.com/hashicorp/hcl/v2/hcl"
|
|
|
|
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,
|
|
},
|
|
},
|
|
}
|