Commit Graph

9 Commits

Author SHA1 Message Date
Mitchell Hashimoto 2212d6895d helper/schema: diff with set going to 0 elements removes it from state 2015-02-17 11:38:56 -08:00
Paul Hinze 219aa3e788 helper/schema: fix DiffFieldReader map handling
An `InstanceDiff` will include `ResourceAttrDiff` entries for the
"length" / `#` field of maps. This makes sense, since for something like
`terraform plan` it's useful to see when counts are changing.

The `DiffFieldReader` was not taking these entries into account when
reading maps out, and was therefore incorrectly returning maps that
included an extra `'#'` field, which was causing all sorts of havoc
for providers (extra tags on AWS instances, broken google compute
instance launch, possibly others).

 * fixes #914 - extra tags on AWS instances
 * fixes #883 - general core issue sprouted from #757
 * removes the hack+TODO from #757
2015-02-03 20:17:57 -06:00
Mitchell Hashimoto 1fcd24cf67 helper/schema: add float type 2015-01-10 16:04:01 -08:00
Mitchell Hashimoto 361d00347a helper/schema: refactor tests for fieldreader to be common 2015-01-10 12:42:15 -08:00
Mitchell Hashimoto b4bf813151 helper/schema: too big to fail 2015-01-08 18:02:19 -08:00
Mitchell Hashimoto 7e379cb1a1 helper/schema: field readers no longer take a schema as arg 2015-01-03 12:13:46 -05:00
Mitchell Hashimoto 0b1da37b20 helper/schema: diff field reader should merge result with source 2015-01-03 09:55:38 -05:00
Mitchell Hashimoto 91a57b42e8 helper/schema: reading a diff with computed should return zero value 2015-01-03 12:02:49 +05:30
Mitchell Hashimoto 73726e83b2 helper/schema: DiffFieldReader for reading data from a diff 2014-12-20 02:17:35 +05:30