diff --git a/terraform/main.tf b/terraform/main.tf index 560ce8e..cdb9e06 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -3,7 +3,7 @@ data "ignition_file" "ssh_key_agent" { path = "/opt/bin/ssh-key-agent" source { - source = "https://github.com/utilitywarehouse/ssh-key-agent/releases/download/${var.agent_version}/ssh-key-agent_${local.vless_agent_version}_linux_amd64" + source = "https://github.com/utilitywarehouse/ssh-key-agent/releases/download/${var.agent_version}/ssh-key-agent_${local.vless_agent_version}_linux_${var.arch}" } } @@ -24,7 +24,7 @@ data "ignition_systemd_unit" "ssh_key_agent_download" { enabled = var.enabled content = templatefile("${path.module}/resources/ssh-key-agent-download.service", { - source = "https://github.com/utilitywarehouse/ssh-key-agent/releases/download/${var.agent_version}/ssh-key-agent_${local.vless_agent_version}_linux_amd64" + source = "https://github.com/utilitywarehouse/ssh-key-agent/releases/download/${var.agent_version}/ssh-key-agent_${local.vless_agent_version}_linux_${var.arch}" } ) } diff --git a/terraform/variables.tf b/terraform/variables.tf index edac0cf..6fa151c 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -1,3 +1,13 @@ +variable "arch" { + type = string + description = "The ssh-key-agent binary arch to fecth if not running in docker" + default = "amd64" + validation { + condition = contains(["amd64", "arm64"], var.arch) + error_message = "Arch should be one of: amd64, arm64" + } +} + variable "uri" { type = string description = "The S3 URI of the authmap file"