VpcId can be nil in the wild

This commit is contained in:
Maxime Bury 2016-02-17 20:06:18 -05:00
parent 28eff5bcf9
commit eb2aaef016
1 changed files with 3 additions and 1 deletions

View File

@ -690,7 +690,9 @@ func flattenLambdaVpcConfigResponse(s *lambda.VpcConfigResponse) []map[string]in
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}
}