mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-09-11 08:35:24 +03:00
`nixos-rebuild/deploy.sh` script enable ssh authentication with a given private key through the `SSH_KEY` environment variable. Add additional variable for the private key used for the deployment. To encourage the use of ssh-agent and discourage the storage of deployment keys in the terraform state we do not set the install ssh key as the default for the deployment key. Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
28 lines
665 B
HCL
28 lines
665 B
HCL
variable "nixos_system" {
|
|
type = string
|
|
description = "The nixos system to deploy"
|
|
}
|
|
|
|
variable "target_host" {
|
|
type = string
|
|
description = "DNS host to deploy to"
|
|
}
|
|
|
|
variable "target_user" {
|
|
type = string
|
|
default = "root"
|
|
description = "User to deploy as"
|
|
}
|
|
|
|
variable "target_port" {
|
|
type = number
|
|
description = "SSH port used to connect to the target_host"
|
|
default = 22
|
|
}
|
|
|
|
variable "ssh_private_key" {
|
|
type = string
|
|
description = "Content of private key used to connect to the target_host. If set to - no key is passed to openssh and ssh will back to its own configuration".
|
|
default = "-"
|
|
}
|