terraform/helper/plugin
Martin Atkins fedbd6c3b8 helper/plugin: fix panic with empty objects in normalizeNullValues
cty.Value.AsValueMap can return nil if called on an empty map or object.
The logic above was dealing with that case for maps, but object types
were falling through into this codepath and panicking when trying to
assign a new key into the nil dstMap.

This also includes a bonus fix where we were calling ty.ElementType in
a switch case that accepts object types. Object types don't have a single
element type, so we can't call ElementType on those (that also panics)
but we _can_ use the type of the value we selected from src to construct
our placeholder null value.
2019-02-13 15:56:12 -08:00
..
doc.go helper/plugin package for grpc servers 2018-10-16 18:58:49 -07:00
grpc_provider.go helper/plugin: fix panic with empty objects in normalizeNullValues 2019-02-13 15:56:12 -08:00
grpc_provider_test.go helper/plugin: fix panic with empty objects in normalizeNullValues 2019-02-13 15:56:12 -08:00
grpc_provisioner.go plugin: Establish our current plugin protocol as version 5 2018-11-19 09:56:41 -08:00
grpc_provisioner_test.go plugin: Establish our current plugin protocol as version 5 2018-11-19 09:56:41 -08:00
unknown.go switch blocks based on value type, and check attrs 2019-02-08 14:46:29 -05:00
unknown_test.go switch blocks based on value type, and check attrs 2019-02-08 14:46:29 -05:00