Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ramseymcgrathfd committed Aug 21, 2024
1 parent 542fa7e commit 5d32ee1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions examples/self-managed-node-group/eks-bottlerocket.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ module "eks_bottlerocket" {
[settings.kernel]
lockdown = "integrity"
EOT

instance_refresh = {}
}
}

Expand Down
5 changes: 4 additions & 1 deletion modules/self-managed-node-group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,10 @@ resource "aws_autoscaling_group" "this" {
}

dynamic "instance_refresh" {
for_each = try(length(var.instance_refresh),0) > 0 ? [var.instance_refresh] : []
for_each = alltrue([
length(var.instance_refresh) > 0,
var.instance_refresh != {}
]) ? [var.instance_refresh] : []

content {
dynamic "preferences" {
Expand Down
1 change: 0 additions & 1 deletion modules/self-managed-node-group/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ variable "instance_refresh" {
min_healthy_percentage = 66
}
}
nullable = true
}

variable "use_mixed_instances_policy" {
Expand Down

0 comments on commit 5d32ee1

Please sign in to comment.