Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit 30de7e3

Browse files
committed
Add support for choosing internal or external ELB for DS LB settings in Master templates; remove original internal external stubs from ELB template since it builds both now.
1 parent 7376e49 commit 30de7e3

5 files changed

Lines changed: 155 additions & 45 deletions

File tree

DeepSecurity/Common/DSM96ELB.template

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,6 @@
2525
"Default" : "4119",
2626
"ConstraintDescription" : "Must be a valid TCP port."
2727
},
28-
"DSELBPosture" : {
29-
"Description" : "Internal or External ELB",
30-
"Type" : "String",
31-
"AllowedValues" : [
32-
"External",
33-
"Internal"
34-
],
35-
"Default" : "External"
36-
},
3728
"DSISubnetID" : {
3829
"Description" : "Existing Subnet for Deep Seucurity Manager. Must be a public subnet contained the in VPC chosen above.",
3930
"Type" : "String",
@@ -78,13 +69,7 @@
7869
]
7970
}
8071
],
81-
"Scheme" : {
82-
"Fn::If" : [
83-
"InternetFacingELB",
84-
"internet-facing",
85-
"internal"
86-
]
87-
},
72+
"Scheme" : "internet-facing",
8873
"Listeners" : [
8974
{
9075
"LoadBalancerPort" : {
@@ -176,16 +161,6 @@
176161
}
177162
}
178163
},
179-
"Conditions" : {
180-
"InternetFacingELB" : {
181-
"Fn::Equals" : [
182-
{
183-
"Ref" : "DSELBPosture"
184-
},
185-
"External"
186-
]
187-
}
188-
},
189164
"Outputs" : {
190165
"ELBFQDN" : {
191166
"Value" : {

DeepSecurity/Marketplace/DSM96MP.template

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,16 @@
195195
"PrivateDSIELB" : {
196196
"Type" : "String",
197197
"Default" : ""
198-
}
198+
},
199+
"DSELBPosture" : {
200+
"Description" : "Use internal or external ELB",
201+
"Type" : "String",
202+
"AllowedValues" : [
203+
"External",
204+
"Internal"
205+
],
206+
"Default" : "External"
207+
}
199208
},
200209
"Mappings" : {
201210
"DSMAMI" : {
@@ -1140,7 +1149,13 @@
11401149
" ",
11411150
{ "Ref" : "DSCAdminPassword" },
11421151
" ",
1143-
{ "Ref" : "DSIELBFQDN" },
1152+
{
1153+
"Fn::If" : [
1154+
"InternetFacingELB",
1155+
{ "Ref" : "DSIELBFQDN" },
1156+
{ "Ref" : "PrivateDSIELBFQDN" }
1157+
]
1158+
},
11441159
" ",
11451160
{ "Ref" : "DSIPGUIPort" },
11461161
" ",
@@ -1494,6 +1509,14 @@
14941509
"Condition" : "PPUNotSelected"
14951510
}
14961511
]
1512+
},
1513+
"InternetFacingELB" : {
1514+
"Fn::Equals" : [
1515+
{
1516+
"Ref" : "DSELBPosture"
1517+
},
1518+
"External"
1519+
]
14971520
}
14981521
},
14991522
"Outputs" : {

DeepSecurity/Marketplace/MasterMP96.template

Lines changed: 58 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,16 @@
280280
"false"
281281
],
282282
"Default" : "false"
283-
}
283+
},
284+
"DSELBPosture" : {
285+
"Description" : "Use internal or external ELB",
286+
"Type" : "String",
287+
"AllowedValues" : [
288+
"External",
289+
"Internal"
290+
],
291+
"Default" : "External"
292+
}
284293
},
285294
"Mappings" : {
286295
"DSMNodeDependency" : {
@@ -391,6 +400,9 @@
391400
"DSIELB",
392401
"Outputs.PrivateELBFQDN"
393402
]
403+
},
404+
"DSELBPosture" : {
405+
"Ref" : "DSELBPosture"
394406
}
395407
}
396408
}
@@ -570,6 +582,9 @@
570582
"DSIELB",
571583
"Outputs.PrivateELBFQDN"
572584
]
585+
},
586+
"DSELBPosture" : {
587+
"Ref" : "DSELBPosture"
573588
}
574589
}
575590
}
@@ -755,7 +770,6 @@
755770
"DSIPGUIPort" : {
756771
"Ref" : "DSIPGUIPort"
757772
},
758-
"DSELBPosture" : "External",
759773
"DSISubnetID" : {
760774
"Ref" : "DSISubnetID"
761775
}
@@ -885,7 +899,15 @@
885899
{ "Condition" : "RegionIsWest2" },
886900
{ "Condition" : "RegionIsEast1" }
887901
]
888-
}
902+
},
903+
"InternetFacingELB" : {
904+
"Fn::Equals" : [
905+
{
906+
"Ref" : "DSELBPosture"
907+
},
908+
"External"
909+
]
910+
}
889911
},
890912
"Outputs" : {
891913
"DeepSecurityConsole" : {
@@ -907,6 +929,38 @@
907929
]
908930
]
909931
}
910-
}
932+
},
933+
"DeepSecurityHeartbeat" : {
934+
"Value" : {
935+
"Fn::Join" : [
936+
"",
937+
[
938+
"dsm://",
939+
{
940+
"Fn::If" : [
941+
"InternetFacingELB",
942+
{
943+
"Fn::GetAtt" : [
944+
"DSIELB",
945+
"Outputs.ELBFQDN"
946+
]
947+
},
948+
{
949+
"Fn::GetAtt" : [
950+
"DSIELB",
951+
"Outputs.PrivateELBFQDN"
952+
]
953+
}
954+
]
955+
},
956+
":",
957+
{
958+
"Ref" : "DSIPHeartbeatPort"
959+
},
960+
"/"
961+
]
962+
]
963+
}
964+
}
911965
}
912966
}

DeepSecurity/RHEL/DSM96RH.template

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,15 @@
183183
"PrivateDSIELB" : {
184184
"Type" : "String",
185185
"Default" : ""
186+
},
187+
"DSELBPosture" : {
188+
"Description" : "Use internal or external ELB",
189+
"Type" : "String",
190+
"AllowedValues" : [
191+
"External",
192+
"Internal"
193+
],
194+
"Default" : "External"
186195
}
187196
},
188197
"Mappings" : {
@@ -999,7 +1008,13 @@
9991008
" ",
10001009
{ "Ref" : "DSCAdminPassword" },
10011010
" ",
1002-
{ "Ref" : "DSIELBFQDN" },
1011+
{
1012+
"Fn::If" : [
1013+
"InternetFacingELB",
1014+
{ "Ref" : "DSIELBFQDN" },
1015+
{ "Ref" : "PrivateDSIELBFQDN" }
1016+
]
1017+
},
10031018
" ",
10041019
{ "Ref" : "DSIPGUIPort" },
10051020
" ",
@@ -1285,7 +1300,15 @@
12851300
{ "Condition" : "IsFirstNode" },
12861301
{ "Condition" : "AddToELB" }
12871302
]
1288-
}
1303+
},
1304+
"InternetFacingELB" : {
1305+
"Fn::Equals" : [
1306+
{
1307+
"Ref" : "DSELBPosture"
1308+
},
1309+
"External"
1310+
]
1311+
}
12891312
},
12901313
"Outputs" : {
12911314
"DSMFQDN" : {

DeepSecurity/RHEL/MasterRH96.template

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
{
1212
"Label" : { "default" : "Network Configuration" },
13-
"Parameters" : [ "AWSIVPC", "DSISubnetID", "DBISubnet1", "DBISubnet2" ]
13+
"Parameters" : [ "AWSIVPC", "DSISubnetID", "DBISubnet1", "DBISubnet2", "DSELBPosture" ]
1414
},
1515
{
1616
"Label" : { "default" : "Database Configuration" },
@@ -41,7 +41,8 @@
4141
"DBISubnet1" : { "default" : "Primary private subnet for RDS" },
4242
"DBISubnet2" : { "default" : "Secondary private subnet for RDS" },
4343
"DBIInstanceIdentifier" : { "default" : "Unique RDS Instance ID" },
44-
"DBPMultiAZ" : { "default" : "Single- or Multi- AZ RDS instance" }
44+
"DBPMultiAZ" : { "default" : "Single- or Multi- AZ RDS instance" },
45+
"DSELBPosture" : { "default" : "Use internal or external ELB" }
4546
}
4647
}
4748
},
@@ -263,7 +264,16 @@
263264
"false"
264265
],
265266
"Default" : "false"
266-
}
267+
},
268+
"DSELBPosture" : {
269+
"Description" : "Use internal or external ELB",
270+
"Type" : "String",
271+
"AllowedValues" : [
272+
"External",
273+
"Internal"
274+
],
275+
"Default" : "External"
276+
}
267277
},
268278
"Resources" : {
269279
"DSM96Node1" : {
@@ -355,6 +365,9 @@
355365
"DSIELB",
356366
"Outputs.PrivateELBFQDN"
357367
]
368+
},
369+
"DSELBPosture" : {
370+
"Ref" : "DSELBPosture"
358371
}
359372
}
360373
}
@@ -528,6 +541,9 @@
528541
"DSIELB",
529542
"Outputs.PrivateELBFQDN"
530543
]
544+
},
545+
"DSELBPosture" : {
546+
"Ref" : "DSELBPosture"
531547
}
532548
}
533549
}
@@ -710,7 +726,6 @@
710726
"DSIPGUIPort" : {
711727
"Ref" : "DSIPGUIPort"
712728
},
713-
"DSELBPosture" : "External",
714729
"DSISubnetID" : {
715730
"Ref" : "DSISubnetID"
716731
}
@@ -822,6 +837,14 @@
822837
"Condition" : "DoNotLaunchRDSInstance"
823838
}
824839
]
840+
},
841+
"InternetFacingELB" : {
842+
"Fn::Equals" : [
843+
{
844+
"Ref" : "DSELBPosture"
845+
},
846+
"External"
847+
]
825848
}
826849
},
827850
"Outputs" : {
@@ -848,13 +871,25 @@
848871
"DeepSecurityHeartbeat" : {
849872
"Value" : {
850873
"Fn::Join" : [
851-
"",[
852-
"dsm://",
853-
{
854-
"Fn::GetAtt" : [
855-
"DSIELB",
856-
"Outputs.ELBFQDN"
857-
]
874+
"",
875+
[
876+
"dsm://",
877+
{
878+
"Fn::If" : [
879+
"InternetFacingELB",
880+
{
881+
"Fn::GetAtt" : [
882+
"DSIELB",
883+
"Outputs.ELBFQDN"
884+
]
885+
},
886+
{
887+
"Fn::GetAtt" : [
888+
"DSIELB",
889+
"Outputs.PrivateELBFQDN"
890+
]
891+
}
892+
]
858893
},
859894
":",
860895
{

0 commit comments

Comments
 (0)