We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4291b59 commit f17cce3Copy full SHA for f17cce3
drivers/amazonec2/amazonec2.go
@@ -866,13 +866,15 @@ func (d *Driver) configureSecurityGroupPermissions(group *ec2.SecurityGroup) []*
866
hasDockerPort := false
867
hasSwarmPort := false
868
for _, p := range group.IpPermissions {
869
- switch *p.FromPort {
870
- case 22:
871
- hasSshPort = true
872
- case int64(dockerPort):
873
- hasDockerPort = true
874
- case int64(swarmPort):
875
- hasSwarmPort = true
+ if p.FromPort != nil {
+ switch *p.FromPort {
+ case 22:
+ hasSshPort = true
+ case int64(dockerPort):
+ hasDockerPort = true
+ case int64(swarmPort):
876
+ hasSwarmPort = true
877
+ }
878
}
879
880
0 commit comments