]>
Commit | Line | Data |
---|---|---|
bae9f6d2 JC |
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 | } |