浏览代码

Prefer external.name over x-aws-securitygroup

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 5 年之前
父节点
当前提交
46cebb3194
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      ecs/cloudformation.go

+ 4 - 0
ecs/cloudformation.go

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