-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add ability to define custom timeout for fargate profiles #1614
feat: Add ability to define custom timeout for fargate profiles #1614
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems be not tested, please test and fix a comments
Additionally I don`t know does changes in README.md where done by you or any automatic ?? (we use precommit hooks to generate some part of docs using terraform-docs)
examples/complete/main.tf
Outdated
@@ -96,6 +96,11 @@ module "eks" { | |||
} | |||
] | |||
|
|||
timeouts = { | |||
create = "15" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error: Error parsing "create" timeout: time: missing unit in duration "15"
examples/fargate/main.tf
Outdated
@@ -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]] | |||
|
|||
# Use custom defaults for create/delete operations | |||
timeouts = { | |||
create = "15" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error: Error parsing "create" timeout: time: missing unit in duration "15"
examples/fargate/main.tf
Outdated
@@ -110,6 +116,12 @@ module "fargate_profile_existing_cluster" { | |||
} | |||
] | |||
|
|||
# Use custom defaults for create/delete operations | |||
timeouts = { | |||
create = "15" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error: Error parsing "create" timeout: time: missing unit in duration "15"
modules/fargate/README.md
Outdated
| subnets | List of subnet IDs. Will replace the root module subnets. | `list(string)` | `var.subnets` | no | | ||
| tags | Key-value map of resource tags. Will be merged with root module tags. | `map(string)` | `var.tags` | no | | ||
| Name | Description | Type | Default | Required | | ||
| --------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | :------: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does those changes where done by you or by some automation?
modules/fargate/README.md
Outdated
| <a name="output_fargate_profile_ids"></a> [fargate\_profile\_ids](#output\_fargate\_profile\_ids) | EKS Cluster name and EKS Fargate Profile names separated by a colon (:). | | ||
| <a name="output_iam_role_arn"></a> [iam\_role\_arn](#output\_iam\_role\_arn) | IAM role ARN for EKS Fargate pods | | ||
| <a name="output_iam_role_name"></a> [iam\_role\_name](#output\_iam\_role\_name) | IAM role name for EKS Fargate pods | | ||
| Name | Description | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what has done those changes?
this part of file should be autogenerated via pre commit hooks
modules/fargate/main.tf
Outdated
@@ -63,5 +63,10 @@ resource "aws_eks_fargate_profile" "this" { | |||
} | |||
} | |||
|
|||
timeouts { | |||
create = lookup(each.value["timeouts"], "create", 10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead assuming some values put failover to null
value which will use provider defaults
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create = lookup(each.value["timeouts"], "create", 10) | |
create = lookup(each.value["timeouts"], "create", null) |
modules/fargate/main.tf
Outdated
@@ -63,5 +63,10 @@ resource "aws_eks_fargate_profile" "this" { | |||
} | |||
} | |||
|
|||
timeouts { | |||
create = lookup(each.value["timeouts"], "create", 10) | |||
delete = lookup(each.value["timeouts"], "delete", 10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete = lookup(each.value["timeouts"], "delete", 10) | |
delete = lookup(each.value["timeouts"], "delete", null) |
5b22760
to
a7ee60f
Compare
variables.tf
Outdated
@@ -387,6 +387,18 @@ variable "fargate_profiles" { | |||
default = {} | |||
} | |||
|
|||
variable "fargate_profiles_create_timeout" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We dont want add additionall variables into submodule, it should follow previously used pattern. I dont know why you changed this as I given you direct suggestion how to make default null value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should same pattern across timeouts (was used previously in this PR, I dont know why you changed)
a50482f
to
89bd8fb
Compare
@daroga0002 Do you mind taking a look again? |
does this was tested? as I get on plan phase:
|
7cf2229
to
2da840c
Compare
@daroga0002 Updated. The problem was that if |
446ddb7
to
2cea749
Compare
@daroga0002 Will you have some time to review it this week perhaps? |
2cea749
to
7ae6fc7
Compare
Any chance this can make it in the next release? For some reason fargate profiles take considerably longer to create nowadays. Most of our terraform applies are failing because of this timeout, and it is failing our testing pipelines :( |
Any chance this can be looked at please? |
I have this on my list, will do this till end of week |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add into file
https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/modules/fargate/README.md
in line 17 following content:
| timeouts | A map of timeouts for create/delete operations. | `map(string)` | Provider default behavior | no |
examples/fargate/main.tf
Outdated
|
||
# Set custom timeout for create/delete operation on fargate profiles | ||
timeouts = { | ||
create = "20m" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets remove create
just for test case when we have just one subargument
examples/fargate/main.tf
Outdated
@@ -89,6 +95,12 @@ module "eks" { | |||
tags = { | |||
Owner = "secondary" | |||
} | |||
|
|||
# Set custom timeout for create/delete operation on fargate profiles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove lines 99-103 for test case when we dont define any timeout arguments
@IvanDechovsky thank you for your contribution, 3 comments and after fixing we will be able to merge it |
…ns for fargate profiles
7ae6fc7
to
6ecd9ec
Compare
@daroga0002 Thank you for taking a look. Updated! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One typo in behaviour
to fix and we can merge.
@antonbabenko this can be merged when typo will be fixed (maybe you can accept commit on suggestion?)
# [17.24.0](v17.23.0...v17.24.0) (2021-11-22) ### Bug Fixes * Added Deny for CreateLogGroup action in EKS cluster role ([#1594](#1594)) ([6959b9b](6959b9b)) * update CI/CD process to enable auto-release workflow ([#1698](#1698)) ([b876ff9](b876ff9)) ### Features * Add ability to define custom timeout for fargate profiles ([#1614](#1614)) ([b7539dc](b7539dc)) * Removed ng_depends_on variable and related hack ([#1672](#1672)) ([56e93d7](56e93d7))
This PR is included in version 17.24.0 🎉 |
# [17.24.0](terraform-aws-modules/terraform-aws-eks@v17.23.0...v17.24.0) (2021-11-22) ### Bug Fixes * Added Deny for CreateLogGroup action in EKS cluster role ([terraform-aws-modules#1594](terraform-aws-modules#1594)) ([6959b9b](terraform-aws-modules@6959b9b)) * update CI/CD process to enable auto-release workflow ([terraform-aws-modules#1698](terraform-aws-modules#1698)) ([b876ff9](terraform-aws-modules@b876ff9)) ### Features * Add ability to define custom timeout for fargate profiles ([terraform-aws-modules#1614](terraform-aws-modules#1614)) ([b7539dc](terraform-aws-modules@b7539dc)) * Removed ng_depends_on variable and related hack ([terraform-aws-modules#1672](terraform-aws-modules#1672)) ([56e93d7](terraform-aws-modules@56e93d7))
# [17.24.0](terraform-aws-modules/terraform-aws-eks@v17.23.0...v17.24.0) (2021-11-22) ### Bug Fixes * Added Deny for CreateLogGroup action in EKS cluster role ([terraform-aws-modules#1594](terraform-aws-modules#1594)) ([6959b9b](terraform-aws-modules@6959b9b)) * update CI/CD process to enable auto-release workflow ([terraform-aws-modules#1698](terraform-aws-modules#1698)) ([b876ff9](terraform-aws-modules@b876ff9)) ### Features * Add ability to define custom timeout for fargate profiles ([terraform-aws-modules#1614](terraform-aws-modules#1614)) ([b7539dc](terraform-aws-modules@b7539dc)) * Removed ng_depends_on variable and related hack ([terraform-aws-modules#1672](terraform-aws-modules#1672)) ([56e93d7](terraform-aws-modules@56e93d7))
# [17.24.0](terraform-aws-modules/terraform-aws-eks@v17.23.0...v17.24.0) (2021-11-22) ### Bug Fixes * Added Deny for CreateLogGroup action in EKS cluster role ([terraform-aws-modules#1594](terraform-aws-modules#1594)) ([6959b9b](terraform-aws-modules@6959b9b)) * update CI/CD process to enable auto-release workflow ([terraform-aws-modules#1698](terraform-aws-modules#1698)) ([b876ff9](terraform-aws-modules@b876ff9)) ### Features * Add ability to define custom timeout for fargate profiles ([terraform-aws-modules#1614](terraform-aws-modules#1614)) ([b7539dc](terraform-aws-modules@b7539dc)) * Removed ng_depends_on variable and related hack ([terraform-aws-modules#1672](terraform-aws-modules#1672)) ([56e93d7](terraform-aws-modules@56e93d7))
# [17.24.0](terraform-aws-modules/terraform-aws-eks@v17.23.0...v17.24.0) (2021-11-22) ### Bug Fixes * Added Deny for CreateLogGroup action in EKS cluster role ([#1594](terraform-aws-modules/terraform-aws-eks#1594)) ([d240238](terraform-aws-modules/terraform-aws-eks@d240238)) * update CI/CD process to enable auto-release workflow ([#1698](terraform-aws-modules/terraform-aws-eks#1698)) ([cd93161](terraform-aws-modules/terraform-aws-eks@cd93161)) ### Features * Add ability to define custom timeout for fargate profiles ([#1614](terraform-aws-modules/terraform-aws-eks#1614)) ([43b675b](terraform-aws-modules/terraform-aws-eks@43b675b)) * Removed ng_depends_on variable and related hack ([#1672](terraform-aws-modules/terraform-aws-eks#1672)) ([e610b83](terraform-aws-modules/terraform-aws-eks@e610b83))
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Add ability to define custom timeout for create/delete operations for fargate profiles
#1610