Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions internal/backend/local/backend_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"sort"
"strings"

"github.com/hashicorp/hcl/v2"
"github.com/zclconf/go-cty/cty"

"github.com/hashicorp/terraform/internal/backend"
Expand Down Expand Up @@ -506,22 +505,3 @@ func (v unparsedUnknownVariableValue) ParseVariableValue(mode configs.VariablePa
SourceType: terraform.ValueFromInput,
}, nil
}

type unparsedTestVariableValue struct {
expr hcl.Expression
ctx *hcl.EvalContext
}

func (v unparsedTestVariableValue) ParseVariableValue(mode configs.VariableParsingMode) (*terraform.InputValue, tfdiags.Diagnostics) {
var diags tfdiags.Diagnostics
val, hclDiags := v.expr.Value(v.ctx) // nil because no function calls or variable references are allowed here
diags = diags.Append(hclDiags)

rng := tfdiags.SourceRangeFromHCL(v.expr.Range())

return &terraform.InputValue{
Value: val,
SourceType: terraform.ValueFromConfig, // Test variables always come from config.
SourceRange: rng,
}, diags
}
Loading