github.com/hashicorp/hcl/v2@v2.20.0/ext/dynblock/schema.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 package dynblock 5 6 import "github.com/hashicorp/hcl/v2" 7 8 var dynamicBlockHeaderSchema = hcl.BlockHeaderSchema{ 9 Type: "dynamic", 10 LabelNames: []string{"type"}, 11 } 12 13 var dynamicBlockBodySchemaLabels = &hcl.BodySchema{ 14 Attributes: []hcl.AttributeSchema{ 15 { 16 Name: "for_each", 17 Required: true, 18 }, 19 { 20 Name: "iterator", 21 Required: false, 22 }, 23 { 24 Name: "labels", 25 Required: true, 26 }, 27 }, 28 Blocks: []hcl.BlockHeaderSchema{ 29 { 30 Type: "content", 31 LabelNames: nil, 32 }, 33 }, 34 } 35 36 var dynamicBlockBodySchemaNoLabels = &hcl.BodySchema{ 37 Attributes: []hcl.AttributeSchema{ 38 { 39 Name: "for_each", 40 Required: true, 41 }, 42 { 43 Name: "iterator", 44 Required: false, 45 }, 46 }, 47 Blocks: []hcl.BlockHeaderSchema{ 48 { 49 Type: "content", 50 LabelNames: nil, 51 }, 52 }, 53 }