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

Commit 387370d

Browse files
authored
Merge pull request #623 from docker/external
Prefer external.name over x-aws-securitygroup
2 parents 6d35a6d + 46cebb3 commit 387370d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ecs/cloudformation.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,11 @@ func createCloudMap(project *types.Project, template *cloudformation.Template) {
566566
}
567567

568568
func convertNetwork(project *types.Project, net types.NetworkConfig, vpc string, template *cloudformation.Template) string {
569+
if net.External.External {
570+
return net.Name
571+
}
569572
if sg, ok := net.Extensions[extensionSecurityGroup]; ok {
573+
logrus.Warn("to use an existing security-group, set `network.external` and `network.name` in your compose file")
570574
logrus.Debugf("Security Group for network %q set by user to %q", net.Name, sg)
571575
return sg.(string)
572576
}

0 commit comments

Comments
 (0)