rancher / tf-rancher-up

MIT License
14 stars 5 forks source link

SSH keypair fix #164

Closed dkeightley closed 1 month ago

dkeightley commented 1 month ago
│ Error: Invalid function argument
│ 
│   on ../../../../modules/infra/aws/outputs.tf line 29, in output "ssh_key":
│   29:   value = var.create_ssh_key_pair ? tls_private_key.ssh_private_key[0].private_key_openssh : (var.ssh_key_pair_path != null ? file(pathexpand(var.ssh_key_pair_path)) : var.ssh_key)
│     ├────────────────
│     │ while calling file(path)
│     │ var.ssh_key_pair_path is "..../recipes/upstream/aws/rke2/xxxx-ssh_private_key.pem"
│ 
│ Invalid value for "path" parameter: no file exists at "/..../recipes/upstream/aws/rke2/xxx-ssh_private_key.pem"; this function works only

Note: PR branch is based on https://github.com/rancher/tf-rancher-up/pull/163 so should be merged first