diff --git a/helper/runner.go b/helper/runner.go index da93560..acb2916 100644 --- a/helper/runner.go +++ b/helper/runner.go @@ -238,7 +238,7 @@ func decodeVariableBlock(block *hcl.Block) (*Variable, hcl.Diagnostics) { DeclRange: block.DefRange, } - content, diags := block.Body.Content(&hcl.BodySchema{ + content, _, diags := block.Body.PartialContent(&hcl.BodySchema{ Attributes: []hcl.AttributeSchema{ { Name: "default", diff --git a/helper/runner_test.go b/helper/runner_test.go index 16e523a..a5f3828 100644 --- a/helper/runner_test.go +++ b/helper/runner_test.go @@ -265,6 +265,7 @@ resource "aws_instance" "foo" { Name: "string interpolation", Src: ` variable "instance_type" { + type = string default = "t2.micro" }