terraform: walkContext

This commit is contained in:
Mitchell Hashimoto 2014-09-23 13:21:45 -07:00
parent bc67e7c443
commit c164839ed1
3 changed files with 560 additions and 537 deletions

File diff suppressed because it is too large Load Diff

View File

@ -160,7 +160,7 @@ func (c *ResourceConfig) get(
return current, true
}
func (c *ResourceConfig) interpolate(ctx *Context) error {
func (c *ResourceConfig) interpolate(ctx *walkContext) error {
if c == nil {
return nil
}

View File

@ -67,7 +67,7 @@ func TestResourceConfigGet(t *testing.T) {
rc := NewResourceConfig(rawC)
if tc.Vars != nil {
ctx := NewContext(&ContextOpts{Variables: tc.Vars})
if err := rc.interpolate(ctx); err != nil {
if err := rc.interpolate(ctx.walkContext(rootModulePath)); err != nil {
t.Fatalf("err: %s", err)
}
}