Fix empty TypeList expands in generated resources (#2233)

<!-- This change is generated by MagicModules. -->
/cc @rileykarson
This commit is contained in:
The Magician 2018-10-11 12:57:31 -07:00 committed by Nathan McKinley
parent d1ed156954
commit 6670f0cccc
2 changed files with 2 additions and 2 deletions

View File

@ -1039,7 +1039,7 @@ func expandComputeDiskSourceImageEncryptionKeySha256(v interface{}, d *schema.Re
func expandComputeDiskDiskEncryptionKey(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) {
l := v.([]interface{})
if len(l) == 0 {
if len(l) == 0 || l[0] == nil {
return nil, nil
}
raw := l[0]

View File

@ -1299,7 +1299,7 @@ func expandMonitoringAlertPolicyLabels(v interface{}, d *schema.ResourceData, co
func expandMonitoringAlertPolicyDocumentation(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) {
l := v.([]interface{})
if len(l) == 0 {
if len(l) == 0 || l[0] == nil {
return nil, nil
}
raw := l[0]