terraform/state
James Nugent 6aac79e194 state: Add support for outputs of multiple types
This commit adds the groundwork for supporting module outputs of types
other than string. In order to do so, the state version is increased
from 1 to 2 (though the "public-facing" state version is actually as the
first state file was binary).

Tests are added to ensure that V2 (1) state is upgraded to V3 (2) state,
though no separate read path is required since the V2 JSON will
unmarshal correctly into the V3 structure.

Outputs in a ModuleState are now of type map[string]interface{}, and a
test covers round-tripping string, []string and map[string]string, which
should cover all of the types in question.

Type switches have been added where necessary to deal with the
interface{} value, but they currently default to panicking when the input
is not a string.
2016-05-10 14:40:12 -04:00
..
remote state: Add support for outputs of multiple types 2016-05-10 14:40:12 -04:00
backup.go state: backup state 2015-02-23 15:13:54 -08:00
backup_test.go state: backup state 2015-02-23 15:13:54 -08:00
cache.go state: cache should use State.Equal to check equality 2015-04-07 15:03:04 -07:00
cache_test.go state: cache state test 2015-02-23 15:13:53 -08:00
inmem.go state: deep copies are required 2015-02-23 21:36:58 -08:00
inmem_test.go state: InmemState 2015-02-23 15:13:55 -08:00
local.go state: deep copies are required 2015-02-23 21:36:58 -08:00
local_test.go state: LocalState supports alternate output path 2015-02-23 15:13:54 -08:00
state.go command: start migrating to new state package 2015-02-23 15:13:54 -08:00
testing.go state: Add support for outputs of multiple types 2016-05-10 14:40:12 -04:00