Skip to content

Commit 0ee9d63

Browse files
RGPosadasmax-rocket-internet
authored andcommitted
Added timeout configs and variables to aws_eks_cluster resource (#149)
* Added timeout configs and variables * Updated CHANGELOG and README * Added timeout configs and variables * Updated CHANGELOG and README * Changed variable names for consistency * Updated README.md * Did terraform fmt
1 parent 77a7690 commit 0ee9d63

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
- A useful addition (slam dunk, @self 🔥)
1313
- Worker groups can be created with a specified IAM profile. (from @laverya)
14+
- exposed `aws_eks_cluster` create and destroy timeouts (by @RGPosadas)
1415

1516
### Changed
1617

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a
9898
9999
| Name | Description | Type | Default | Required |
100100
|------|-------------|:----:|:-----:|:-----:|
101+
| cluster_create_timeout | Timeout value when creating the EKS cluster. | string | `15m` | no |
102+
| cluster_delete_timeout | Timeout value when deleting the EKS cluster. | string | `15m` | no |
101103
| cluster_name | Name of the EKS cluster. Also used as a prefix in names of related resources. | string | - | yes |
102104
| cluster_security_group_id | If provided, the EKS cluster will be attached to this security group. If not given, a security group will be created with necessary ingres/egress to work with the workers and provide API access to your current IP/32. | string | `` | no |
103105
| cluster_version | Kubernetes version to use for the EKS cluster. | string | `1.10` | no |

cluster.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ resource "aws_eks_cluster" "this" {
88
subnet_ids = ["${var.subnets}"]
99
}
1010

11+
timeouts {
12+
create = "${var.cluster_create_timeout}"
13+
delete = "${var.cluster_delete_timeout}"
14+
}
15+
1116
depends_on = [
1217
"aws_iam_role_policy_attachment.cluster_AmazonEKSClusterPolicy",
1318
"aws_iam_role_policy_attachment.cluster_AmazonEKSServicePolicy",

variables.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,13 @@ variable "kubeconfig_name" {
123123
description = "Override the default name used for items kubeconfig."
124124
default = ""
125125
}
126+
127+
variable "cluster_create_timeout" {
128+
description = "Timeout value when creating the EKS cluster."
129+
default = "15m"
130+
}
131+
132+
variable "cluster_delete_timeout" {
133+
description = "Timeout value when deleting the EKS cluster."
134+
default = "15m"
135+
}

0 commit comments

Comments
 (0)