feat: Add ability to define custom timeout for fargate profiles (#1614)

This commit is contained in:
Ivan Dechovski
2021-11-03 10:44:26 +01:00
committed by GitHub
parent 6959b9bae3
commit b7539dc220
4 changed files with 20 additions and 0 deletions

View File

@@ -114,6 +114,11 @@ module "eks" {
tags = {
Owner = "test"
}
timeouts = {
create = "20m"
delete = "20m"
}
}
}

View File

@@ -68,6 +68,11 @@ module "eks" {
tags = {
Owner = "default"
}
timeouts = {
create = "20m"
delete = "20m"
}
}
secondary = {
@@ -154,6 +159,10 @@ module "fargate_profile_existing_cluster" {
Owner = "profile2"
submodule = "true"
}
timeouts = {
delete = "20m"
}
}
}

View File

@@ -15,6 +15,7 @@ See example code in `examples/fargate`.
| name | Fargate profile name | `string` | Auto generated in the following format `[cluster_name]-fargate-[fargate_profile_map_key]`| no |
| selectors | A list of Kubernetes selectors. See examples/fargate/main.tf for example format. | <pre>list(map({<br>namespace = string<br>labels = map(string)<br>}))</pre>| `[]` | no |
| subnets | List of subnet IDs. Will replace the root module subnets. | `list(string)` | `var.subnets` | no |
| timeouts | A map of timeouts for create/delete operations. | `map(string)` | Provider default behavior | no |
| tags | Key-value map of resource tags. Will be merged with root module tags. | `map(string)` | `var.tags` | no |
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

View File

@@ -63,5 +63,10 @@ resource "aws_eks_fargate_profile" "this" {
}
}
timeouts {
create = try(each.value["timeouts"].create, null)
delete = try(each.value["timeouts"].delete, null)
}
tags = merge(var.tags, lookup(each.value, "tags", {}))
}