hashicorp/terraform — pull request #620 by rubbish (2014-12-02 19:58:35+00:00)
Title: Fix for multivars when modulestate not created yet

I ran into this when I referred to a multivar in the root module when there wasn't anything in the state yet. It turns out that we can just nil check that module and return empty during plan, but the apply will actually get the correct value.

Here's the lines from my crash.log:
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0x9731d]

goroutine 100 [running]:
runtime.panic(0x479fe0, 0x7549a4)
/usr/local/Cellar/go/1.3.3/libexec/src/pkg/runtime/panic.c:279 +0xf5
github.com/hashicorp/terraform/terraform.(*walkContext).computeResourceMultiVariable(0xc2080c77c0, 0xc20801bc70, 0x0, 0x0, 0x0, 0x0)
/Users/luke/.go/src/github.com/hashicorp/terraform/terraform/context.go:1734 +0x7bd
github.com/hashicorp/terraform/terraform.(*walkContext).computeVars(0xc2080c77c0, 0xc208004960, 0x0, 0x0, 0x0)
/Users/luke/.go/src/github.com/hashicorp/terraform/terraform/context.go:1549 +0xea4
github.com/hashicorp/terraform/terraform.(*ResourceConfig).interpolate(0xc2081c48d0, 0xc2080c77c0, 0x0, 0x0, 0x0)
/Users/luke/.go/src/github.com/hashicorp/terraform/terraform/resource.go:208 +0x78
github.com/hashicorp/terraform/terraform.func·009(0xc20819dfc0, 0x0, 0x0)
/Users/luke/.go/src/github.com/hashicorp/terraform/terraform/context.go:1205 +0x667
github.com/hashicorp/terraform/depgraph.func·002(0xc20819dfc0)
/Users/luke/.go/src/github.com/hashicorp/terraform/depgraph/graph.go:321 +0x254
```