terraform/helper
James Nugent cb9ef298f3 core: Defeat backward compatibilty in mapstructure
The mapstructure library has a regrettable backward compatibility
concern whereby a WeakDecode of []interface{}{} into a target of
map[string]interface{} yields an empty map rather than an error. One
possibility is to switch to using Decode instead of WeakDecode, but this
loses the nice handling of type conversion, requiring a large volume of
code to be added to Terraform or HIL in order to retain that behaviour.

Instead we add a DecodeHook to our usage of the mapstructure library
which checks for decoding []interface{}{} or []string{} into a map and
returns an error instead.

This has the effect of defeating the code added to retain backwards
compatibility in mapstructure, giving us the correct (for our
circumstances) behaviour of Decode for empty structures and the type
conversion of WeakDecode.

The code is identical to that in the HIL library, and packaged into a
helper.
2016-06-08 18:38:41 +01:00
..
acctest tests: allow opt-out of remote tests via env var 2016-01-21 15:44:18 -06:00
config Fix failing tests 2014-10-09 21:29:21 -07:00
diff helper/diff: replace ocnfig/lang 2016-02-03 13:24:04 -05:00
hashcode formatting, cleanups 2015-02-11 11:40:49 -08:00
hilmapstructure core: Defeat backward compatibilty in mapstructure 2016-06-08 18:38:41 +01:00
logging provider/aws: log HTTP req/resp at DEBUG level 2016-03-14 12:26:37 -05:00
mutexkv provider/aws: serialize SG rule access to fix race condition 2015-11-18 12:39:59 -06:00
pathorcontents ssh: accept private key contents instead of path 2015-11-12 14:59:14 -06:00
resource Merge pull request #6946 from TimeIncOSS/f-aws-s3-object-data-source 2016-06-02 07:04:46 +01:00
schema core: Remove unnecessary debug logging 2016-06-08 18:38:41 +01:00
README.md dos2unix 2014-07-28 10:43:00 -07:00

README.md

Helper Libraries

This folder contains helper libraries for Terraform plugins. A running joke is that this is "Terraform standard library" for plugins. The goal of the packages in this directory are to provide high-level helpers to make it easier to implement the various aspects of writing a plugin for Terraform.