nil checks when assigning to param map in resourceAwsSsmDocumentRead (#12891)

* add nil check when assingment from a doc parameter to the param map

* remove println
This commit is contained in:
Dylan Conrad Johnson 2017-03-20 12:24:13 -06:00 committed by Paul Stack
parent 3c94a89a05
commit 934aa22549
1 changed files with 9 additions and 3 deletions

View File

@ -205,9 +205,15 @@ func resourceAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error
if dp.DefaultValue != nil { if dp.DefaultValue != nil {
param["default_value"] = *dp.DefaultValue param["default_value"] = *dp.DefaultValue
} }
if dp.Description != nil {
param["description"] = *dp.Description param["description"] = *dp.Description
}
if dp.Name != nil {
param["name"] = *dp.Name param["name"] = *dp.Name
}
if dp.Type != nil {
param["type"] = *dp.Type param["type"] = *dp.Type
}
params = append(params, param) params = append(params, param)
} }