Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.24.1 to 2.26.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.24.1...v2.26.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
29 lines
714 B
Go
29 lines
714 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package hcl
|
|
|
|
import (
|
|
"github.com/zclconf/go-cty/cty"
|
|
"github.com/zclconf/go-cty/cty/function"
|
|
)
|
|
|
|
// An EvalContext provides the variables and functions that should be used
|
|
// to evaluate an expression.
|
|
type EvalContext struct {
|
|
Variables map[string]cty.Value
|
|
Functions map[string]function.Function
|
|
parent *EvalContext
|
|
}
|
|
|
|
// NewChild returns a new EvalContext that is a child of the receiver.
|
|
func (ctx *EvalContext) NewChild() *EvalContext {
|
|
return &EvalContext{parent: ctx}
|
|
}
|
|
|
|
// Parent returns the parent of the receiver, or nil if the receiver has
|
|
// no parent.
|
|
func (ctx *EvalContext) Parent() *EvalContext {
|
|
return ctx.parent
|
|
}
|