Skip to content

Commit

Permalink
Auto instance refresh (Guimove#142)
Browse files Browse the repository at this point in the history
* Support instance refresh

* Trigger instance refresh on launch template version updates
  • Loading branch information
thecadams authored Oct 11, 2022
1 parent 64e8b28 commit 3266c47
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ resource "aws_autoscaling_group" "bastion_auto_scaling_group" {
name_prefix = "ASG-${local.name_prefix}"
launch_template {
id = aws_launch_template.bastion_launch_template.id
version = "$Latest"
version = aws_launch_template.bastion_launch_template.latest_version
}
max_size = var.bastion_instance_count
min_size = var.bastion_instance_count
Expand Down Expand Up @@ -291,6 +291,10 @@ resource "aws_autoscaling_group" "bastion_auto_scaling_group" {
propagate_at_launch = true
}

instance_refresh {
strategy = "Rolling"
}

lifecycle {
create_before_destroy = true
}
Expand Down

0 comments on commit 3266c47

Please sign in to comment.