Skip to content

Commit

Permalink
feat: Add ability to define custom timeout for create/delete operatio…
Browse files Browse the repository at this point in the history
…ns for fargate profiles
  • Loading branch information
Ivan Dechovski committed Oct 11, 2021
1 parent f198efd commit 7cf2229
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ module "eks" {
tags = {
Owner = "test"
}

# Set custom timeout for create/delete operation on fargate profiles
timeouts = {
create = "20m"
delete = "20m"
}
}
}

Expand Down
18 changes: 18 additions & 0 deletions examples/fargate/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ module "eks" {
tags = {
Owner = "default"
}

# Set custom timeout for create/delete operation on fargate profiles
timeouts = {
create = "20m"
delete = "20m"
}
}

secondary = {
Expand All @@ -54,6 +60,12 @@ module "eks" {
tags = {
Owner = "secondary"
}

# Set custom timeout for create/delete operation on fargate profiles
timeouts = {
create = "20m"
delete = "20m"
}
}
}

Expand Down Expand Up @@ -116,6 +128,12 @@ module "fargate_profile_existing_cluster" {
tags = {
Owner = "profile2"
}

# Set custom timeout for create/delete operation on fargate profiles
timeouts = {
create = "20m"
delete = "20m"
}
}
}

Expand Down
5 changes: 5 additions & 0 deletions modules/fargate/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,10 @@ resource "aws_eks_fargate_profile" "this" {
}
}

timeouts {
create = lookup(each.value["timeouts"], "create", null)
delete = lookup(each.value["timeouts"], "delete", null)
}

tags = merge(var.tags, lookup(each.value, "tags", {}))
}

0 comments on commit 7cf2229

Please sign in to comment.