From 3d160ce744dd70f3c5c8df3804349e06216750be Mon Sep 17 00:00:00 2001 From: Tyler Langlois Date: Fri, 27 May 2022 20:45:17 -0600 Subject: [PATCH 1/2] Parameterize timeout --- deploy_nixos/main.tf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deploy_nixos/main.tf b/deploy_nixos/main.tf index 862cb4f..8b898d1 100644 --- a/deploy_nixos/main.tf +++ b/deploy_nixos/main.tf @@ -111,6 +111,12 @@ variable "delete_older_than" { default = "+1" } +variable "timeout" { + type = string + description = "Remote connection timeout." + default = "100s" +} + # -------------------------------------------------------------------------- locals { @@ -157,7 +163,7 @@ resource "null_resource" "deploy_nixos" { port = var.target_port user = var.target_user agent = local.ssh_agent - timeout = "100s" + timeout = var.timeout private_key = local.ssh_private_key == "-" ? "" : local.ssh_private_key } From 9901de52699d82f9473ae1ae48eae230ee186f88 Mon Sep 17 00:00:00 2001 From: Tyler Langlois Date: Fri, 27 May 2022 21:09:01 -0600 Subject: [PATCH 2/2] Add `timeout` parameter documentation --- deploy_nixos/README.md | 1 + deploy_nixos/main.tf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy_nixos/README.md b/deploy_nixos/README.md index a91f7af..bbbe531 100644 --- a/deploy_nixos/README.md +++ b/deploy_nixos/README.md @@ -118,6 +118,7 @@ see also: | target\_port | SSH port used to connect to the target\_host | `number` | `22` | no | | target\_system | Nix system string | `string` | `"x86_64-linux"` | no | | target\_user | SSH user used to connect to the target\_host | `string` | `"root"` | no | +| timeout | Remote ssh connection timeout | `string` | `"100s"` | no | | triggers | Triggers for deploy | `map(string)` | `{}` | no | ## Outputs diff --git a/deploy_nixos/main.tf b/deploy_nixos/main.tf index 8b898d1..06e7d8d 100644 --- a/deploy_nixos/main.tf +++ b/deploy_nixos/main.tf @@ -113,7 +113,7 @@ variable "delete_older_than" { variable "timeout" { type = string - description = "Remote connection timeout." + description = "Remote ssh connection timeout." default = "100s" }