File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 88- Support for Granular Security Lists in Load Balancer
99- Support for Network Security Groups in databases
1010
11+ ### Fixed
12+ - Address panics caused by invalid type assertions in object map conversion. This could potentially affect attributes
13+ that are maps of string values.
14+
1115## 3.32.0 (July 03, 2019)
1216
1317### Added
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ package provider
44
55import (
66 "fmt"
7+ "log"
78 "math/rand"
89 "time"
910
@@ -61,7 +62,14 @@ func validateNotEmptyString() schema.SchemaValidateFunc {
6162func objectMapToStringMap (rm map [string ]interface {}) map [string ]string {
6263 result := map [string ]string {}
6364 for k , v := range rm {
64- result [k ] = v .(string )
65+ switch assertedValue := v .(type ) {
66+ case string :
67+ result [k ] = assertedValue
68+ default :
69+ // Make a best effort to coerce into a string, even if underlying type is not a string
70+ log .Printf ("[DEBUG] non-string value encountered for key '%s' while converting object map to string map" , k )
71+ result [k ] = fmt .Sprintf ("%v" , assertedValue )
72+ }
6573 }
6674 return result
6775}
You can’t perform that action at this time.
0 commit comments