6 "github.com/hashicorp/terraform/config"
9 // EvalInterpolate is an EvalNode implementation that takes a raw
10 // configuration and interpolates it.
11 type EvalInterpolate struct {
12 Config *config.RawConfig
14 Output **ResourceConfig
18 func (n *EvalInterpolate) Eval(ctx EvalContext) (interface{}, error) {
19 rc, err := ctx.Interpolate(n.Config, n.Resource)
22 log.Printf("[WARN] Interpolation %q failed: %s", n.Config.Key, err)
23 return nil, EvalEarlyExitError{}
35 // EvalInterpolateProvider is an EvalNode implementation that takes a
36 // ProviderConfig and interpolates it. Provider configurations are the only
37 // "inherited" type of configuration we have, and the original raw config may
38 // have a different interpolation scope.
39 type EvalInterpolateProvider struct {
40 Config *config.ProviderConfig
42 Output **ResourceConfig
45 func (n *EvalInterpolateProvider) Eval(ctx EvalContext) (interface{}, error) {
46 rc, err := ctx.InterpolateProvider(n.Config, n.Resource)