terraform/state
James Nugent 706ccb7dfe core: Introduce state v3 and upgrade process
This commit makes the current Terraform state version 3 (previously 2),
and a migration process as part of reading v2 state. For the most part
this is unnecessary: helper/schema will deal with upgrading state for
providers written with that framework. However, for providers which
implemented the resource model directly, this gives a best-efforts
attempt at lossless upgrade.

The heuristics used to change the count of a map from the .# key to the
.% key are as follows:

    - if the flat map contains any non-numeric keys, we treat it as a
      map
    - if the map is empty it must be computed or optional, so we remove
      it from state

There is a known edge condition: maps with all-numeric keys are
indistinguishable from sets without access to the schema. They will need
manual conversion or may result in spurious diffs.
2016-06-09 10:49:49 +01:00
..
remote core: Introduce state v3 and upgrade process 2016-06-09 10:49:49 +01: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 core: Use OutputState in JSON instead of map 2016-05-18 13:25:20 -05:00