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 862cb4f..06e7d8d 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 ssh 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 }