Is there a terraform script schema

i want to create a kotlin DSL for terraform - (like this one for aws cloudformation - is there a schema definition for terraform script ?

Hi @houseelectricsopen,

There is not a machine-readable description of the full Terraform language. Parts of the language that come from plugins do have schema available, e.g. via terraform providers schema -json, but that describes only the contents of block types like resource, data, provider, etc.

For generated Terraform configuration, I’d recommend using JSON Syntax rather than the HCL native syntax because then you can generate it with an existing JSON implementation, rather than templating HCL.

Thats depressing - even worse than AWS cloudformation which has a large proportion of the schema defined but is missing vital parts such as the serverless extension entirely and IAM policies. If I go ahead I will define the schema manually in Kotlin. Thanks