diff --git a/go.mod b/go.mod index d89f3612..3a017989 100644 --- a/go.mod +++ b/go.mod @@ -13,3 +13,8 @@ require ( github.com/zclconf/go-cty v1.8.3 github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b ) + +replace ( + github.com/hashicorp/hcl-lang v0.0.0-20210522074354-f7480edf31b5 => github.com/aztfmod/hcl-lang v0.0.0-20210607111743-09c4e3d54cdd + github.com/hashicorp/hcl-lang v0.0.0-20210603100913-81056fd9a6e0 => github.com/aztfmod/hcl-lang v0.0.0-20210607111743-09c4e3d54cdd +) diff --git a/go.sum b/go.sum index 0e909142..e460db2a 100644 --- a/go.sum +++ b/go.sum @@ -6,6 +6,8 @@ github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2 github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= +github.com/aztfmod/hcl-lang v0.0.0-20210607111743-09c4e3d54cdd h1:CfHURxxCn2t1sIHsboGydHsaRAHp36MSL4jWEXLHOGU= +github.com/aztfmod/hcl-lang v0.0.0-20210607111743-09c4e3d54cdd/go.mod h1:uMsq6wV8ZXEH8qndov4tncXlHDYnZ8aHsGmS4T74e2o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -27,8 +29,6 @@ github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9 github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw= github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hcl-lang v0.0.0-20210603100913-81056fd9a6e0 h1:CmEDMGKu8J5E8Yk4lcYwS8tC/K2ybAQ4nStw8raIjVQ= -github.com/hashicorp/hcl-lang v0.0.0-20210603100913-81056fd9a6e0/go.mod h1:uMsq6wV8ZXEH8qndov4tncXlHDYnZ8aHsGmS4T74e2o= github.com/hashicorp/hcl/v2 v2.10.0 h1:1S1UnuhDGlv3gRFV4+0EdwB+znNP5HmcGbIqwnSCByg= github.com/hashicorp/hcl/v2 v2.10.0/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg= github.com/hashicorp/terraform-json v0.11.0 h1:4zDqqW2F3kOysORIaYKFGgWDYIRA3hwqx3XHeHkbBQ0= diff --git a/internal/schema/0.12/variable_block.go b/internal/schema/0.12/variable_block.go index cc98cc08..bc992da8 100644 --- a/internal/schema/0.12/variable_block.go +++ b/internal/schema/0.12/variable_block.go @@ -35,7 +35,7 @@ func variableBlockSchema(v *version.Version) *schema.BlockSchema { Description: lang.Markdown("Description to document the purpose of the variable and what value is expected"), }, "type": { - Expr: schema.ExprConstraints{}, + Expr: schema.ExprConstraints{schema.TypeDeclarationExpr{}}, IsOptional: true, Description: lang.Markdown("Type constraint restricting the type of value to accept, e.g. `string` or `list(string)`"), }, diff --git a/internal/schema/0.14/variable_block.go b/internal/schema/0.14/variable_block.go index a78e4442..a2b98b29 100644 --- a/internal/schema/0.14/variable_block.go +++ b/internal/schema/0.14/variable_block.go @@ -34,7 +34,7 @@ var variableBlockSchema = &schema.BlockSchema{ Description: lang.Markdown("Description to document the purpose of the variable and what value is expected"), }, "type": { - Expr: schema.ExprConstraints{}, + Expr: schema.ExprConstraints{schema.TypeDeclarationExpr{}}, IsOptional: true, Description: lang.Markdown("Type constraint restricting the type of value to accept, e.g. `string` or `list(string)`"), },