Skip to content

Commit

Permalink
Allow selecting architecture for ssh-key-agent binaries on tf
Browse files Browse the repository at this point in the history
  • Loading branch information
ffilippopoulos committed Apr 23, 2024
1 parent 3e43785 commit dd2e37f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}
}

Expand All @@ -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}"
}
)
}
Expand Down
10 changes: 10 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit dd2e37f

Please sign in to comment.