Skip to content

Commit 2da840c

Browse files
author
Ivan Dechovski
committed
feat: Add ability to define custom timeout for create/delete operations for fargate profiles
1 parent f198efd commit 2da840c

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

examples/complete/main.tf

+6
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ module "eks" {
9999
tags = {
100100
Owner = "test"
101101
}
102+
103+
# Set custom timeout for create/delete operation on fargate profiles
104+
timeouts = {
105+
create = "20m"
106+
delete = "20m"
107+
}
102108
}
103109
}
104110

examples/fargate/main.tf

+18
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ module "eks" {
3333
tags = {
3434
Owner = "default"
3535
}
36+
37+
# Set custom timeout for create/delete operation on fargate profiles
38+
timeouts = {
39+
create = "20m"
40+
delete = "20m"
41+
}
3642
}
3743

3844
secondary = {
@@ -54,6 +60,12 @@ module "eks" {
5460
tags = {
5561
Owner = "secondary"
5662
}
63+
64+
# Set custom timeout for create/delete operation on fargate profiles
65+
timeouts = {
66+
create = "20m"
67+
delete = "20m"
68+
}
5769
}
5870
}
5971

@@ -116,6 +128,12 @@ module "fargate_profile_existing_cluster" {
116128
tags = {
117129
Owner = "profile2"
118130
}
131+
132+
# Set custom timeout for create/delete operation on fargate profiles
133+
timeouts = {
134+
create = "20m"
135+
delete = "20m"
136+
}
119137
}
120138
}
121139

modules/fargate/main.tf

+5
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,10 @@ resource "aws_eks_fargate_profile" "this" {
6363
}
6464
}
6565

66+
timeouts {
67+
create = contains(keys(each.value), "timeouts") ? each.value["timeouts"]["create"] : null
68+
delete = contains(keys(each.value), "timeouts") ? each.value["timeouts"]["delete"] : null
69+
}
70+
6671
tags = merge(var.tags, lookup(each.value, "tags", {}))
6772
}

0 commit comments

Comments
 (0)