Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Euhus <pascal.euhus@reservix.de>
  • Loading branch information
PacoVK committed Feb 14, 2021
1 parent f2493af commit 9676c23
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions ecs/awsResources.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (

// vpcSubNets classification
type vpcSubNets struct {
public []awsResource
public []awsResource
private []awsResource
}

Expand Down Expand Up @@ -325,7 +325,10 @@ func (b *ecsAPIService) ensureResources(resources *awsResources, project *types.
if err != nil {
return err
}
b.ensureLoadBalancer(resources, project, template)
err = b.ensureLoadBalancer(resources, project, template)
if err != nil {
return err
}
return nil
}

Expand Down Expand Up @@ -461,9 +464,9 @@ func (b *ecsAPIService) ensureLoadBalancer(r *awsResources, project *types.Proje
}

var publicSubNetIDs []string
for _, subNetID := range r.subnetsIDs() {
publicSubNetIDs = append(publicSubNetIDs, subNetID)
}
for _, subNetID := range r.subnetsIDs() {
publicSubNetIDs = append(publicSubNetIDs, subNetID)
}

template.Resources["LoadBalancer"] = &elasticloadbalancingv2.LoadBalancer{
Scheme: elbv2.LoadBalancerSchemeEnumInternetFacing,
Expand Down
2 changes: 1 addition & 1 deletion ecs/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ func (s sdk) ResolveLoadBalancer(ctx context.Context, nameOrArn string) (awsReso
it := lbs.LoadBalancers[0]
var subNets vpcSubNets
for _, az := range it.AvailabilityZones {
isPublic, err := s.IsPublicSubnet(ctx,aws.StringValue(az.SubnetId));
isPublic, err := s.IsPublicSubnet(ctx, aws.StringValue(az.SubnetId))
if err != nil {
return nil, "", "", subNets, err
}
Expand Down

0 comments on commit 9676c23

Please sign in to comment.