terraform/builtin/providers/template
Paul Hinze 0739cf2348 provider/template: fix race causing panic in template_file
The render code path in `template_file` was doing unsynchronized access
to a shared mapping of functions in `config.Func`.

This caused a race condition that was most often triggered when a
`template_file` had a `count` of more than one, and expressed itself as
a panic in the plugin followed by a cascade of "unexpected EOF" errors
through the plugin system.

Here, we simply turn the FuncMap from shared state into a generated
value, which avoids the race. We do more re-initialization of the data
structure, but the performance implications are minimal, and we can
always revisit with a perf pass later now that the race is fixed.
2016-01-15 16:34:46 -05:00
..
provider.go Adds template_cloudinit_config resource to template 2015-12-21 13:32:26 -05:00
provider_test.go providers: add template provider 2015-05-01 16:59:49 -07:00
resource_cloudinit_config.go Alters template provider to use a fork of multipart. 2015-12-21 13:32:26 -05:00
resource_cloudinit_config_test.go Alters template provider to use a fork of multipart. 2015-12-21 13:32:26 -05:00
resource_template_file.go provider/template: fix race causing panic in template_file 2016-01-15 16:34:46 -05:00
resource_template_file_test.go provider/template: fix race causing panic in template_file 2016-01-15 16:34:46 -05:00