Generalize fix to ignore empty VPC config
This commit is contained in:
parent
eb2aaef016
commit
f0f3c430a8
|
@ -688,11 +688,14 @@ func flattenLambdaVpcConfigResponse(s *lambda.VpcConfigResponse) []map[string]in
|
|||
return nil
|
||||
}
|
||||
|
||||
// Empty
|
||||
if len(s.SubnetIds) == 0 && len(s.SecurityGroupIds) == 0 && s.VpcId == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
settings["subnet_ids"] = schema.NewSet(schema.HashString, flattenStringList(s.SubnetIds))
|
||||
settings["security_group_ids"] = schema.NewSet(schema.HashString, flattenStringList(s.SecurityGroupIds))
|
||||
if s.VpcId != nil {
|
||||
settings["vpc_id"] = *s.VpcId
|
||||
}
|
||||
|
||||
return []map[string]interface{}{settings}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue