Skip to content

Instantly share code, notes, and snippets.

@endofcake
Created May 11, 2018 00:39
Show Gist options
  • Save endofcake/ed5a4ed5d3cb1958832fd8779cab20f1 to your computer and use it in GitHub Desktop.
Save endofcake/ed5a4ed5d3cb1958832fd8779cab20f1 to your computer and use it in GitHub Desktop.
Auto Scaling rolling updates (CloudFormation embedded in Terraform)
CreationPolicy:
AutoScalingCreationPolicy:
MinSuccessfulInstancesPercent: 80
ResourceSignal:
Count: "${var.cfn_signal_count}"
Timeout: PT10M
UpdatePolicy:
# Ignore differences in group size properties caused by scheduled actions
AutoScalingScheduledAction:
IgnoreUnmodifiedGroupSizeProperties: true
AutoScalingRollingUpdate:
MaxBatchSize: "${var.asg_max_size}"
MinInstancesInService: "${var.asg_min_size}"
MinSuccessfulInstancesPercent: 80
PauseTime: PT10M
SuspendProcesses:
- HealthCheck
- ReplaceUnhealthy
- AZRebalance
- AlarmNotification
- ScheduledActions
WaitOnResourceSignals: true
DeletionPolicy: Retain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment