Skip to content

Commit 1671a30

Browse files
committed
Merge remote-tracking branch 'nitrocode/warm-pool' into keithduncan/add-asg-lifecycle-warm-pool
2 parents d50bb4b + 19d047a commit 1671a30

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
@@ -443,6 +443,11 @@ Parameters:
443443
Default: 0
444444
MinValue: 0
445445

446+
WarmPoolMinSize:
447+
Type: Number
448+
Description: Minimum number of instances in warm pool
449+
Default: 0
450+
446451
Rules:
447452
HasToken:
448453
Assertions:
@@ -595,6 +600,9 @@ Conditions:
595600
UseMaxInstanceLifetime:
596601
!Not [ !Equals [ !Ref MaxInstanceLifetime, 0 ] ]
597602

603+
UseWarmPool:
604+
!Not [ !Equals [ !Ref WarmPoolMinSize, 0 ] ]
605+
598606
Mappings:
599607
ECRManagedPolicy:
600608
none : { Policy: '' }
@@ -1091,6 +1099,14 @@ Resources:
10911099
AutoScalingReplacingUpdate:
10921100
WillReplace: true
10931101

1102+
AsgWarmPool:
1103+
Type: AWS::AutoScaling::WarmPool
1104+
Condition: UseWarmPool
1105+
Properties:
1106+
AutoScalingGroupName: !Ref AgentAutoScaleGroup
1107+
MinSize: !Ref WarmPoolMinSize
1108+
PoolState: Stopped
1109+
10941110
SecurityGroup:
10951111
Type: AWS::EC2::SecurityGroup
10961112
Condition: CreateSecurityGroup

0 commit comments

Comments
 (0)