Skip to content

Commit

Permalink
update timeouts make consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
Filinto Duran committed Nov 8, 2021
1 parent acc6835 commit e362bf8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ locals {
instance_refresh_instance_warmup = null # The number of seconds until a newly launched instance is configured and ready to use. Defaults to the ASG's health check grace period.
instance_refresh_triggers = [] # Set of additional property names that will trigger an Instance Refresh. A refresh will always be triggered by a change in any of launch_configuration, launch_template, or mixed_instances_policy.
capacity_rebalance = false # Enable capacity rebalance
asg_delete_timeout = null # Enable setting the timeouts for autoscaling groups delete operation
}

workers_group_defaults = merge(
Expand Down
6 changes: 1 addition & 5 deletions workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,7 @@ resource "aws_autoscaling_group" "workers" {
local.workers_group_defaults["capacity_rebalance"]
)
timeouts {
delete = lookup(
var.worker_groups[count.index],
"delete_timeout",
local.workers_group_defaults["asg_delete_timeout"]
)
delete = lookup(each.value["timeouts"], "delete", null)
}

dynamic "initial_lifecycle_hook" {
Expand Down
6 changes: 1 addition & 5 deletions workers_launch_template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,7 @@ resource "aws_autoscaling_group" "workers_launch_template" {
local.workers_group_defaults["capacity_rebalance"]
)
timeouts {
delete = lookup(
var.worker_groups_launch_template[count.index],
"delete_timeout",
local.workers_group_defaults["asg_delete_timeout"]
)
delete = lookup(each.value["timeouts"], "delete", null)
}

dynamic "mixed_instances_policy" {
Expand Down

0 comments on commit e362bf8

Please sign in to comment.