Skip to content

Commit

Permalink
add in option to turn on app cookie stickyness
Browse files Browse the repository at this point in the history
  • Loading branch information
keirbadger committed Sep 21, 2022
1 parent 81efca9 commit 46f3933
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,15 @@ resource "aws_alb_target_group" "default_target_group" {
service = "${var.env}-${local.default_target_group_component}"
team = var.team
}

dynamic "stickiness" {
for_each = var.sticky
content {
cookie_duration = stickiness.value["cookie_duration"]
cookie_name = stickiness.value["cookie_name"]
enabled = stickiness.value["enabled"]
type = stickiness.value["type"]
}
}
}

5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,8 @@ variable "run_data" {
default = true
}


variable "sticky" {
description = "turn on sticky"
default = []
}

0 comments on commit 46f3933

Please sign in to comment.