mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-19 09:39:59 +00:00
dbf9188792
```bash GO111MODULE=on go get github.com/hashicorp/terraform@pluginsdk-v0.12-early7 GO111MODULE=on go mod vendor GO111MODULE=on go mod tidy ```
107 lines
1.5 KiB
Go
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",
|
|
},
|
|
},
|
|
}
|