Skip to content

Commit

Permalink
public subnets support for Runfargate
Browse files Browse the repository at this point in the history
  • Loading branch information
teaguru committed May 9, 2024
1 parent 3db714d commit 35b8d6f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/runFargate.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,17 @@ func RunFargate(profile, cluster, service, taskDefinitionName, imageTag string,
// Fetch subnets and security groups
subnets, err := fetchSubnetsByTag(svcEC2, "Tier", "private")
if err != nil {
log.WithError(err).Error("Failed to fetch subnets by tag")
log.WithError(err).Error("Failed to fetch subnets by private tag")
return 1, err
}
if len(subnets) == 0 {
subnets, err = fetchSubnetsByTag(svcEC2, "Tier", "public")

if err != nil {
log.WithError(err).Error("Failed to fetch subnets by public tag")
return 1, err
}
}
securityGroups, err := fetchSecurityGroupsByName(svcEC2, securityGroupFilter)
if err != nil {
log.WithError(err).Error("Failed to fetch security groups by name")
Expand Down

0 comments on commit 35b8d6f

Please sign in to comment.