diff --git a/CHANGELOG.md b/CHANGELOG.md index 49a8286..18c8ad6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ project adheres to [Semantic Versioning](http://semver.org/). - A useful addition (slam dunk, @self 🔥) - Worker groups can be created with a specified IAM profile. (from @laverya) +- exposed `aws_eks_cluster` create and destroy timeouts (by @RGPosadas) ### Changed diff --git a/README.md b/README.md index 05666de..1a40ed0 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,8 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| cluster_create_timeout | Timeout value when creating the EKS cluster. | string | `15m` | no | +| cluster_delete_timeout | Timeout value when deleting the EKS cluster. | string | `15m` | no | | cluster_name | Name of the EKS cluster. Also used as a prefix in names of related resources. | string | - | yes | | 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 | | cluster_version | Kubernetes version to use for the EKS cluster. | string | `1.10` | no | diff --git a/cluster.tf b/cluster.tf index f6d8b41..40ab1ab 100644 --- a/cluster.tf +++ b/cluster.tf @@ -8,6 +8,11 @@ resource "aws_eks_cluster" "this" { subnet_ids = ["${var.subnets}"] } + timeouts { + create = "${var.cluster_create_timeout}" + delete = "${var.cluster_delete_timeout}" + } + depends_on = [ "aws_iam_role_policy_attachment.cluster_AmazonEKSClusterPolicy", "aws_iam_role_policy_attachment.cluster_AmazonEKSServicePolicy", diff --git a/variables.tf b/variables.tf index 1364bc4..5bc339d 100644 --- a/variables.tf +++ b/variables.tf @@ -123,3 +123,13 @@ variable "kubeconfig_name" { description = "Override the default name used for items kubeconfig." default = "" } + +variable "cluster_create_timeout" { + description = "Timeout value when creating the EKS cluster." + default = "15m" +} + +variable "cluster_delete_timeout" { + description = "Timeout value when deleting the EKS cluster." + default = "15m" +}