|
368 | 368 | },
|
369 | 369 |
|
370 | 370 | "SwarmWideSG": {
|
371 |
| - "DependsOn": "NodeVpcSG", |
| 371 | + "DependsOn": "Vpc", |
372 | 372 | "Type": "AWS::EC2::SecurityGroup",
|
373 | 373 | "Properties": {
|
374 | 374 | "VpcId": {
|
375 | 375 | "Ref": "Vpc"
|
376 | 376 | },
|
377 |
| - "GroupDescription": "Wide open", |
| 377 | + "GroupDescription": "Swarm wide access", |
378 | 378 | "SecurityGroupIngress": [
|
379 | 379 | {
|
380 | 380 | "IpProtocol": "-1",
|
|
428 | 428 | },
|
429 | 429 | "GroupDescription": "Manager SecurityGroup",
|
430 | 430 | "SecurityGroupIngress": [
|
431 |
| - {"IpProtocol": "tcp","FromPort": "22","ToPort": "22","CidrIp": "0.0.0.0/0"}, |
432 |
| - {"IpProtocol": "tcp","FromPort": "2375","ToPort": "2375", "SourceSecurityGroupId" : { "Fn::GetAtt" : [ "NodeVpcSG", "GroupId" ] } }, |
| 431 | + {"IpProtocol": "tcp", "FromPort": "22","ToPort": "22","CidrIp": "0.0.0.0/0"}, |
433 | 432 | {"IpProtocol" : "tcp", "FromPort" : "2377", "ToPort" : "2377", "SourceSecurityGroupId" : { "Fn::GetAtt" : [ "NodeVpcSG", "GroupId" ] } },
|
434 | 433 | {"IpProtocol" : "udp", "FromPort" : "4789", "ToPort" : "4789", "SourceSecurityGroupId" : { "Fn::GetAtt" : [ "NodeVpcSG", "GroupId" ] } },
|
435 | 434 | {"IpProtocol" : "tcp", "FromPort" : "7946", "ToPort" : "7946", "SourceSecurityGroupId" : { "Fn::GetAtt" : [ "NodeVpcSG", "GroupId" ] } },
|
|
444 | 443 | "VpcId": {
|
445 | 444 | "Ref": "Vpc"
|
446 | 445 | },
|
447 |
| - "GroupDescription": "Node SecurityGroup" |
| 446 | + "GroupDescription": "Node SecurityGroup", |
| 447 | + "SecurityGroupIngress": [ |
| 448 | + { |
| 449 | + "IpProtocol": "-1", |
| 450 | + "FromPort": "0", |
| 451 | + "ToPort": "65535", |
| 452 | + "CidrIp": { "Fn::FindInMap" : [ "VpcCidrs", "vpc", "cidr" ] } |
| 453 | + } |
| 454 | + ], |
| 455 | + "SecurityGroupEgress": [ |
| 456 | + {"IpProtocol" : "icmp", "FromPort" : "8", "ToPort" : "0", "CidrIp": "0.0.0.0/0" }, |
| 457 | + {"IpProtocol" : "udp", "FromPort" : "0", "ToPort" : "65535", "CidrIp": "0.0.0.0/0" }, |
| 458 | + {"IpProtocol" : "tcp", "FromPort" : "0", "ToPort" : "2374", "CidrIp": "0.0.0.0/0" }, |
| 459 | + {"IpProtocol" : "tcp", "FromPort" : "2376", "ToPort" : "65535", "CidrIp": "0.0.0.0/0" } |
| 460 | + ] |
448 | 461 | }
|
449 | 462 | },
|
450 | 463 |
|
|
686 | 699 | }]
|
687 | 700 | },
|
688 | 701 | "AssociatePublicIpAddress": "true",
|
689 |
| - "SecurityGroups": [ { "Ref" : "NodeVpcSG"}, { "Ref" : "SwarmWideSG"} ], |
| 702 | + "SecurityGroups": [ { "Ref" : "NodeVpcSG"} ], |
690 | 703 | "UserData": {
|
691 | 704 | "Fn::Base64": {
|
692 | 705 | "Fn::Join": [
|
|
771 | 784 | "HealthCheck" : {
|
772 | 785 | "HealthyThreshold" : "2",
|
773 | 786 | "Interval" : "10",
|
774 |
| - "Target" : "TCP:2375", |
| 787 | + "Target" : "TCP:44554", |
775 | 788 | "Timeout" : "2",
|
776 | 789 | "UnhealthyThreshold" : "4"
|
777 | 790 | },
|
|
0 commit comments