Skip to content

Commit

Permalink
Skip un-used variable block attributes (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
bendrucker authored Mar 30, 2022
1 parent 3d6d075 commit c549c67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion helper/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions helper/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ resource "aws_instance" "foo" {
Name: "string interpolation",
Src: `
variable "instance_type" {
type = string
default = "t2.micro"
}
Expand Down

0 comments on commit c549c67

Please sign in to comment.