Skip to content

Commit 19d047a

Browse files
authored
Add Warm Pool
1 parent b30aee2 commit 19d047a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

templates/aws-stack.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,11 @@ Parameters:
406406
- "false"
407407
Default: "false"
408408

409+
WarmPoolMinSize:
410+
Type: Number
411+
Description: Minimum number of instances in warm pool
412+
Default: 0
413+
409414
Outputs:
410415
VpcId:
411416
Value:
@@ -534,6 +539,9 @@ Conditions:
534539
- !Equals [ !Select [ 0, !Split [ ".", !Ref InstanceType ] ], "r6g" ]
535540
- !Equals [ !Select [ 0, !Split [ ".", !Ref InstanceType ] ], "r6gd" ]
536541

542+
UseWarmPool:
543+
!Not [ !Equals [ !Ref WarmPoolMinSize, 0 ] ]
544+
537545
Mappings:
538546
ECRManagedPolicy:
539547
none : { Policy: '' }
@@ -1026,6 +1034,14 @@ Resources:
10261034
AutoScalingReplacingUpdate:
10271035
WillReplace: true
10281036

1037+
AsgWarmPool:
1038+
Type: AWS::AutoScaling::WarmPool
1039+
Condition: UseWarmPool
1040+
Properties:
1041+
AutoScalingGroupName: !Ref AgentAutoScaleGroup
1042+
MinSize: !Ref WarmPoolMinSize
1043+
PoolState: Stopped
1044+
10291045
AsgProcessSuspenderRole:
10301046
Type: AWS::IAM::Role
10311047
Properties:

0 commit comments

Comments
 (0)