Files
trivy/pkg/iac/terraform/schema.go
2025-03-11 00:23:41 +00:00

60 lines
952 B
Go

package terraform
import "github.com/hashicorp/hcl/v2"
// Schema is regularly lifted from terraform source to ensure compatibility
var Schema = &hcl.BodySchema{
Blocks: []hcl.BlockHeaderSchema{
{
Type: "terraform",
},
{
Type: "required_providers",
},
{
Type: "provider",
LabelNames: []string{"name"},
},
{
Type: "variable",
LabelNames: []string{"name"},
},
{
Type: "locals",
},
{
Type: "output",
LabelNames: []string{"name"},
},
{
Type: "module",
LabelNames: []string{"name"},
},
{
Type: "check",
LabelNames: []string{"name"},
},
{
Type: "resource",
LabelNames: []string{"type", "name"},
},
{
Type: "data",
LabelNames: []string{"type", "name"},
},
{
Type: "ephemeral",
LabelNames: []string{"type", "name"},
},
{
Type: "moved",
},
{
Type: "import",
},
{
Type: "removed",
},
},
}