terraform-provider-google/vendor/github.com/hashicorp/terraform-config-inspect/tfconfig/schema.go
Riley Karson dbf9188792
Vendor 0.12 SDK (#3432)
```bash
GO111MODULE=on go get github.com/hashicorp/terraform@pluginsdk-v0.12-early7
GO111MODULE=on go mod vendor
GO111MODULE=on go mod tidy
```
2019-04-15 13:39:47 -07:00

107 lines
1.5 KiB
Go

package tfconfig
import (
"github.com/hashicorp/hcl2/hcl"
)
var rootSchema = &hcl.BodySchema{
Blocks: []hcl.BlockHeaderSchema{
{
Type: "terraform",
LabelNames: nil,
},
{
Type: "variable",
LabelNames: []string{"name"},
},
{
Type: "output",
LabelNames: []string{"name"},
},
{
Type: "provider",
LabelNames: []string{"name"},
},
{
Type: "resource",
LabelNames: []string{"type", "name"},
},
{
Type: "data",
LabelNames: []string{"type", "name"},
},
{
Type: "module",
LabelNames: []string{"name"},
},
},
}
var terraformBlockSchema = &hcl.BodySchema{
Attributes: []hcl.AttributeSchema{
{
Name: "required_version",
},
},
Blocks: []hcl.BlockHeaderSchema{
{
Type: "required_providers",
},
},
}
var providerConfigSchema = &hcl.BodySchema{
Attributes: []hcl.AttributeSchema{
{
Name: "version",
},
{
Name: "alias",
},
},
}
var variableSchema = &hcl.BodySchema{
Attributes: []hcl.AttributeSchema{
{
Name: "type",
},
{
Name: "description",
},
{
Name: "default",
},
},
}
var outputSchema = &hcl.BodySchema{
Attributes: []hcl.AttributeSchema{
{
Name: "description",
},
},
}
var moduleCallSchema = &hcl.BodySchema{
Attributes: []hcl.AttributeSchema{
{
Name: "source",
},
{
Name: "version",
},
{
Name: "providers",
},
},
}
var resourceSchema = &hcl.BodySchema{
Attributes: []hcl.AttributeSchema{
{
Name: "provider",
},
},
}