opentofu/terraform/eval_interpolate.go

26 lines
548 B
Go
Raw Normal View History

2015-02-03 03:43:18 -06:00
package terraform
import (
"github.com/hashicorp/terraform/config"
)
// EvalInterpolate is an EvalNode implementation that takes a raw
// configuration and interpolates it.
type EvalInterpolate struct {
Config *config.RawConfig
Resource *Resource
2015-02-03 03:43:18 -06:00
}
func (n *EvalInterpolate) Args() ([]EvalNode, []EvalType) {
return nil, nil
}
func (n *EvalInterpolate) Eval(
ctx EvalContext, args []interface{}) (interface{}, error) {
return ctx.Interpolate(n.Config, n.Resource)
2015-02-03 03:43:18 -06:00
}
func (n *EvalInterpolate) Type() EvalType {
return EvalTypeConfig
}