Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .buildkite/steps/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ cat <<EOF >config.json
"ParameterKey": "ScaleInIdlePeriod",
"ParameterValue": "60"
},
{
"ParameterKey": "InstanceScaleInProtection",
"ParameterValue": "false"
},
{
"ParameterKey": "EnableInstanceStorage",
"ParameterValue": "${enable_instance_storage:-false}"
Expand Down
11 changes: 10 additions & 1 deletion templates/aws-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ Metadata:
- MaxSize
- InstanceBuffer
- DisableScaleIn
- InstanceScaleInProtection
- OnDemandBaseCapacity
- OnDemandPercentage
- SpotAllocationStrategy
Expand Down Expand Up @@ -292,6 +293,14 @@ Parameters:
- "false"
Default: "true"

InstanceScaleInProtection:
Description: Whether new instances launched by the Auto Scaling group should have scale-in protection enabled. When set to "true" (default), instances cannot be terminated by scale-in actions and must self-terminate when idle. Set to "false" to allow CloudFormation and the ASG to terminate instances directly.
Type: String
AllowedValues:
- "true"
- "false"
Default: "true"

EnableScheduledScaling:
Description: Enable scheduled scaling to automatically adjust MinSize based on time-based schedules
Type: String
Expand Down Expand Up @@ -2273,7 +2282,7 @@ Resources:
TerminationPolicies:
- OldestLaunchConfiguration
- ClosestToNextInstanceHour
NewInstancesProtectedFromScaleIn: true
NewInstancesProtectedFromScaleIn: !Ref InstanceScaleInProtection
CreationPolicy:
ResourceSignal:
Timeout: !If [ UseDefaultInstanceCreationTimeout, !If [ UseWindowsAgents, PT10M, PT5M ], !Ref InstanceCreationTimeout ]
Expand Down