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

Commit 1f37287

Browse files
committed
check if subnet is public
Signed-off-by: Pascal Euhus <[email protected]>
1 parent 5739799 commit 1f37287

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ecs/awsResources.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ func (b *ecsAPIService) ensureVolumes(r *awsResources, project *types.Project, t
421421
return nil
422422
}
423423

424-
func (b *ecsAPIService) ensureLoadBalancer(r *awsResources, project *types.Project, template *cloudformation.Template) {
424+
func (b *ecsAPIService) ensureLoadBalancer(r *awsResources, project *types.Project, template *cloudformation.Template) error {
425425
if r.loadBalancer != nil {
426426
return
427427
}
@@ -452,7 +452,7 @@ func (b *ecsAPIService) ensureLoadBalancer(r *awsResources, project *types.Proje
452452

453453
var publicSubNetIDs []string
454454
for _, subNetID := range r.subnetsIDs() {
455-
isPublic, err := b.aws.IsPublicSubnet(b.ctx, subNetID)
455+
isPublic, err := b.aws.IsPublicSubnet(context.Background(), subNetID)
456456
if err != nil {
457457
return err
458458
}
@@ -474,6 +474,7 @@ func (b *ecsAPIService) ensureLoadBalancer(r *awsResources, project *types.Proje
474474
nameProperty: "LoadBalancerName",
475475
}
476476
r.loadBalancerType = balancerType
477+
return nil
477478
}
478479

479480
func (r *awsResources) getLoadBalancerSecurityGroups(project *types.Project) []string {

0 commit comments

Comments
 (0)