Skip to content

Commit

Permalink
platformprovider/lambda: move code to wrap up meaning
Browse files Browse the repository at this point in the history
Signed-off-by: sivchari <shibuuuu5@gmail.com>
  • Loading branch information
sivchari committed Aug 18, 2023
1 parent 710800c commit edd7d06
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/app/piped/platformprovider/lambda/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,19 @@ func (c *client) CreateFunction(ctx context.Context, fm FunctionManifest) error
}
input.Architectures = architectures
}
if fm.Spec.VPCConfig != nil {
input.VpcConfig = &types.VpcConfig{
SecurityGroupIds: fm.Spec.VPCConfig.SecurityGroupIDs,
SubnetIds: fm.Spec.VPCConfig.SubnetIDs,
}
}
// Container image packing.
if fm.Spec.ImageURI != "" {
input.PackageType = types.PackageTypeImage
input.Code = &types.FunctionCode{
ImageUri: aws.String(fm.Spec.ImageURI),
}
}
if fm.Spec.VPCConfig != nil {
input.VpcConfig = &types.VpcConfig{
SecurityGroupIds: fm.Spec.VPCConfig.SecurityGroupIDs,
SubnetIds: fm.Spec.VPCConfig.SubnetIDs,
}
}
// Zip packing which stored in s3.
if fm.Spec.S3Bucket != "" {
input.PackageType = types.PackageTypeZip
Expand Down

0 comments on commit edd7d06

Please sign in to comment.