mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-29 10:21:01 -06:00
26 lines
548 B
Go
26 lines
548 B
Go
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
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
func (n *EvalInterpolate) Type() EvalType {
|
|
return EvalTypeConfig
|
|
}
|