Commit Graph

9 Commits

Author SHA1 Message Date
James Bardin 48c8afaa11 Check for multi-values maps in output too
A map value read from a config file will be the default
`[]map[string]interface{}` type decoded from HCL. Since this type can't
be applied to a variable, it's likely that it was a simple map. If
there's a single map value, we can pull that out of the slice during
Eval.
2016-10-07 15:09:03 -04:00
James Nugent 3ea3c657b5 core: Use OutputState in JSON instead of map
This commit forward ports the changes made for 0.6.17, in order to store
the type and sensitive flag against outputs.

It also refactors the logic of the import for V0 to V1 state, and
fixes up the call sites of the new format for outputs in V2 state.

Finally we fix up tests which did not previously set a state version
where one is required.
2016-05-18 13:25:20 -05:00
James Nugent e57a399d71 core: Use native HIL maps instead of flatmaps
This changes the representation of maps in the interpolator from the
dotted flatmap form of a string variable named "var.variablename.key"
per map element to use native HIL maps instead.

This involves porting some of the interpolation functions in order to
keep the tests green, and adding support for map outputs.

There is one backwards incompatibility: as a result of an implementation
detail of maps, one could access an indexed map variable using the
syntax "${var.variablename.key}".

This is no longer possible - instead HIL native syntax -
"${var.variablename["key"]}" must be used. This was previously
documented, (though not heavily used) so it must be noted as a backward
compatibility issue for Terraform 0.7.
2016-05-10 14:49:13 -04:00
Mitchell Hashimoto 873f5a91bb terraform: EvalDeleteOutput and context test 2015-04-29 11:27:12 -07:00
Mitchell Hashimoto b52881d232 terraform: clean up EvalNodes 2015-02-19 12:08:32 -08:00
Mitchell Hashimoto 960ba73f1d terraform: last apply test 2015-02-19 12:08:08 -08:00
Mitchell Hashimoto 1c713878b0 terraform: fix outputs on destroy 2015-02-19 12:08:07 -08:00
Mitchell Hashimoto 32e714c41d terraform: computed outputs 2015-02-19 12:08:02 -08:00
Mitchell Hashimoto de6827b3ed terraform: calculate outputs and store it into the state 2015-02-19 12:08:02 -08:00