github.com/tam7t/terraform@v0.7.0-rc2.0.20160705125922-be2469a05c5e/terraform/eval_interpolate.go (about) 1 package terraform 2 3 import "github.com/hashicorp/terraform/config" 4 5 // EvalInterpolate is an EvalNode implementation that takes a raw 6 // configuration and interpolates it. 7 type EvalInterpolate struct { 8 Config *config.RawConfig 9 Resource *Resource 10 Output **ResourceConfig 11 } 12 13 func (n *EvalInterpolate) Eval(ctx EvalContext) (interface{}, error) { 14 rc, err := ctx.Interpolate(n.Config, n.Resource) 15 if err != nil { 16 return nil, err 17 } 18 19 if n.Output != nil { 20 *n.Output = rc 21 } 22 23 return nil, nil 24 }