Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #97 from wandera/JSC-47988-warmpool
Browse files Browse the repository at this point in the history
JSC-47988 add support of AWS warm pool to get pre-initialized EC2 instances
  • Loading branch information
mrackoa authored Sep 23, 2022
2 parents 92d3c7e + 76350cc commit 188fed4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions aws/ig/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ locals {
taints = length(var.taints) > 0 ? var.taints : null
subnets = var.subnets
hooks = length(var.hooks) > 0 ? var.hooks : null
warmPool = var.warm-pool != null ? {
minSize = var.warm-pool.min-size
maxSize = var.warm-pool.max-size
enableLifecycleHook = var.warm-pool.enable-lifecycle-hook
} : null
rollingUpdate = {
maxSurge = var.rolling-update.max-surge
maxUnavailable = var.rolling-update.max-unavailable
Expand Down
13 changes: 12 additions & 1 deletion aws/ig/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ variable "max-price" {
type = string
description = "If set, this group will use spot instances with the specified max-price"

default = ""
nullable = true
}

variable "hooks" {
Expand Down Expand Up @@ -177,3 +177,14 @@ variable "rolling-update" {
max-unavailable = 0
}
}

variable "warm-pool" {
type = object({
min-size = number
max-size = number
enable-lifecycle-hook = bool
})
description = "AWS WarmPool to get pre-initialized EC2 instances."

nullable = true
}

0 comments on commit 188fed4

Please sign in to comment.