Skip to content
Closed
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
1 change: 1 addition & 0 deletions local.tf
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ locals {
additional_ebs_volumes = [] # A list of additional volumes to be attached to the instances on this Auto Scaling group. Each volume should be an object with the following: block_device_name (required), volume_size, volume_type, iops, encrypted, kms_key_id (only on launch-template), delete_on_termination. Optional values are grabbed from root volume or from defaults
additional_instance_store_volumes = [] # A list of additional instance store (local disk) volumes to be attached to the instances on this Auto Scaling group. Each volume should be an object with the following: block_device_name (required), virtual_name.
warm_pool = null # If this block is configured, add a Warm Pool to the specified Auto Scaling group.
timeouts = {} # A map of timeouts for create/update/delete operations
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be something like
timeouts = var.timeouts

Copy link

@csschwe csschwe Sep 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only asking because #1552 created a timeouts variable in variables.rb

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I did closed this and open this other one #1566, I did not reuse that variable but probably can add it as last default value


# Settings for launch templates
root_block_device_name = concat(data.aws_ami.eks_worker.*.root_device_name, [""])[0] # Root device name for Linux workers. If not provided, will assume default Linux AMI was used.
Expand Down
1 change: 1 addition & 0 deletions modules/node_groups/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ The role ARN specified in `var.default_iam_role_arn` will be used by default. In
| subnets | Subnets to contain workers | list(string) | `var.workers_group_defaults[subnets]` |
| version | Kubernetes version | string | Provider default behavior |
| taints | Kubernetes node taints | list(map) | empty |
| timeouts | A map of timeouts for create/update/delete operations. | `map(string)` | Provider default behavior |
| update_default_version | Whether or not to set the new launch template version the Default | bool | `true` |

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
Expand Down
1 change: 1 addition & 0 deletions modules/node_groups/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ locals {
pre_userdata = var.workers_group_defaults["pre_userdata"]
additional_security_group_ids = var.workers_group_defaults["additional_security_group_ids"]
taints = []
timeouts = var.workers_group_defaults["timeouts"]
update_default_version = true
ebs_optimized = null
},
Expand Down
6 changes: 6 additions & 0 deletions modules/node_groups/node_groups.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ resource "aws_eks_node_group" "workers" {
}
}

timeouts {
create = lookup(each.value["timeouts"], "create", "60m")
update = lookup(each.value["timeouts"], "update", "30m")
delete = lookup(each.value["timeouts"], "delete", "15m")
}

version = lookup(each.value, "version", null)

labels = merge(
Expand Down
4 changes: 4 additions & 0 deletions workers_launch_template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ resource "aws_autoscaling_group" "workers_launch_template" {
local.workers_group_defaults["capacity_rebalance"]
)

timeouts {
delete = lookup(var.workers_group_defaults["timeouts"], "delete", "10m")
}

dynamic "mixed_instances_policy" {
iterator = item
for_each = (lookup(var.worker_groups_launch_template[count.index], "override_instance_types", null) != null) || (lookup(var.worker_groups_launch_template[count.index], "on_demand_allocation_strategy", local.workers_group_defaults["on_demand_allocation_strategy"]) != null) ? [var.worker_groups_launch_template[count.index]] : []
Expand Down