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 4, 2021
1 parent 253f927 commit 89bd8fb
Show file tree
Hide file tree
Showing 3 changed files with 23 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 @@ -102,6 +102,12 @@ module "eks" {
}
}

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

# AWS Auth (kubernetes_config_map)
map_roles = [
{
Expand Down
12 changes: 12 additions & 0 deletions examples/fargate/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ module "eks" {
# Using specific subnets instead of the ones configured in EKS (`subnets` and `fargate_subnets`)
subnets = [local.vpc.private_subnets[1]]

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

tags = {
Owner = "secondary"
}
Expand Down Expand Up @@ -113,6 +119,12 @@ module "fargate_profile_existing_cluster" {
# Using specific subnets instead of the ones configured in EKS (`subnets` and `fargate_subnets`)
subnets = [local.vpc.private_subnets[1]]

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

tags = {
Owner = "profile2"
}
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 89bd8fb

Please sign in to comment.