Skip to content

Commit

Permalink
Merge pull request #29 from voyagegroup/asg-protect-from-scale-in
Browse files Browse the repository at this point in the history
add asg protect_from_scale_in
  • Loading branch information
larufa authored Mar 29, 2024
2 parents 0d4a844 + 7998c1a commit 34d7421
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ resource "aws_autoscaling_group" "app" {
name = aws_ecs_cluster.main.name
enabled_metrics = var.asg_enabled_metrics

launch_configuration = aws_launch_configuration.app.name
termination_policies = var.asg_termination_policies
launch_configuration = aws_launch_configuration.app.name
protect_from_scale_in = var.asg_protect_from_scale_in
termination_policies = var.asg_termination_policies

# NOTE: this module no handled desired capacity
#desired_capacity = "${var.asg_desired}"
Expand Down
6 changes: 6 additions & 0 deletions cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ variable "asg_enabled_metrics" {
*/
}

variable "asg_protect_from_scale_in" {
description = "AutoScaling Group protect_from_scale_in"
type = bool
default = false
}

variable "asg_termination_policies" {
description = "AutoScaling Group termination_policies"
type = list(string)
Expand Down

0 comments on commit 34d7421

Please sign in to comment.