From 88413775934fe93383cb4337dad3392f06aa081e Mon Sep 17 00:00:00 2001 From: Nung Bedell <134363+nungster@users.noreply.github.com> Date: Wed, 21 Jun 2023 16:43:00 -0400 Subject: [PATCH] Test tf timeout (#55) * Change timeout to seconds * 1m * dude * g * Add terraform timeouts for node pool * Add changelog information --- node_pool/CHANGELOG.md | 3 +++ node_pool/inputs.tf | 18 ++++++++++++++++++ node_pool/main.tf | 6 ++++++ 3 files changed, 27 insertions(+) diff --git a/node_pool/CHANGELOG.md b/node_pool/CHANGELOG.md index 3eaa4c3..543a859 100644 --- a/node_pool/CHANGELOG.md +++ b/node_pool/CHANGELOG.md @@ -1,3 +1,6 @@ +# node-pool-v3.8.2 +- Added `timeout_create`, `timeout_delete`, and `timeout_update` parameters to provide a way to override the Terraform default timeouts for these actions on `google_container_node_pool` node pool resource. + # node-pool-v3.8.1 - Added `node_locations` parameter to limit a node pool to specific zones. Zones selected must be in the parent clusters region. If left empty nodes will default to their parent clusters zones. **Note: node_locations will not revert to the cluster's default set of zones upon being unset. You must manually reconcile the list of zones with your cluster. diff --git a/node_pool/inputs.tf b/node_pool/inputs.tf index 9bd05f0..c7b2647 100644 --- a/node_pool/inputs.tf +++ b/node_pool/inputs.tf @@ -109,3 +109,21 @@ variable "taint" { type = map default = null } + +variable "timeout_create"{ + type = string + description = "Override default timeout for CREATE function" + default = "30m" +} + +variable "timeout_delete"{ + type = string + description = "Override default timeout for DELETE function" + default = "30m" +} + +variable "timeout_update"{ + type = string + description = "Override default timeout for UPDATE function" + default = "30m" +} \ No newline at end of file diff --git a/node_pool/main.tf b/node_pool/main.tf index 401a760..46a1586 100644 --- a/node_pool/main.tf +++ b/node_pool/main.tf @@ -106,4 +106,10 @@ resource "google_container_node_pool" "node_pool" { node_config.0.min_cpu_platform ] } + + timeouts { + create = var.timeout_create + update = var.timeout_update + delete = var.timeout_delete + } }