Skip to content

Commit 2cea749

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

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
@@ -114,6 +114,12 @@ module "eks" {
114114
tags = {
115115
Owner = "test"
116116
}
117+
118+
# Set custom timeout for create/delete operation on fargate profiles
119+
timeouts = {
120+
create = "20m"
121+
delete = "20m"
122+
}
117123
}
118124
}
119125

examples/fargate/main.tf

+18
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ module "eks" {
6868
tags = {
6969
Owner = "default"
7070
}
71+
72+
# Set custom timeout for create/delete operation on fargate profiles
73+
timeouts = {
74+
create = "20m"
75+
delete = "20m"
76+
}
7177
}
7278

7379
secondary = {
@@ -89,6 +95,12 @@ module "eks" {
8995
tags = {
9096
Owner = "secondary"
9197
}
98+
99+
# Set custom timeout for create/delete operation on fargate profiles
100+
timeouts = {
101+
create = "20m"
102+
delete = "20m"
103+
}
92104
}
93105
}
94106

@@ -154,6 +166,12 @@ module "fargate_profile_existing_cluster" {
154166
Owner = "profile2"
155167
submodule = "true"
156168
}
169+
170+
# Set custom timeout for create/delete operation on fargate profiles
171+
timeouts = {
172+
create = "20m"
173+
delete = "20m"
174+
}
157175
}
158176
}
159177

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)