1
2# This resource gets visited first on the apply walk, but since it DynamicExpands
3# to an empty subgraph it ends up being a no-op, leaving the module state
4# uninitialized.
5resource "test_thing" "a" {
6  count = 0
7}
8
9# This resource is visited second. During its eval walk we try to build the
10# array for the null_resource.a.*.id interpolation, which involves iterating
11# over all of the resource in the state. This should succeed even though the
12# module state will be nil when evaluating the variable.
13resource "test_thing" "b" {
14  a_ids = "${join(" ", test_thing.a.*.id)}"
15}
16