Also ignore empty VPC config after all

This commit is contained in:
Maxime Bury 2016-02-23 12:56:46 -08:00
parent 288ba868e4
commit f92b2b7c58
1 changed files with 4 additions and 0 deletions

View File

@ -688,6 +688,10 @@ func flattenLambdaVpcConfigResponse(s *lambda.VpcConfigResponse) []map[string]in
return nil
}
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 {