make private key optional

Setting private_key to null uses the local ssh-agent as a fallback for
authentication. Using the public_key instead of the private_key for
ssh -i lets the agent select the right identity if loaded. tested
with a yubikey
This commit is contained in:
phaer
2022-01-23 14:05:41 +01:00
parent 2ef034bdf0
commit 1236bbe6f3
4 changed files with 14 additions and 7 deletions

View File

@@ -12,6 +12,7 @@ variable "public_key" {
variable "private_key" {
description = "SSH private Key."
type = string
default = null
}
variable "location" {