rancher / tf-rancher-up

MIT License
14 stars 5 forks source link

k3s on AWS fails if create_ssh_key_pair = true ? #119

Open zaggash opened 4 months ago

zaggash commented 4 months 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 "/home/alexxx/Downloads/forked/prefix-ssh_private_key.pem" │ │ Invalid value for "path" parameter: no file exists at "/home/alexxx/Downloads/forked/prefix-ssh_private_key.pem"; this function works only with files that are distributed as part of the │ configuration source code, so if this file will be created by a resource in this configuration you must instead obtain this result from an attribute of that resource. ╵ ╷

dkeightley commented 3 months ago

I saw this recent PR that changed the code.. would you mind checking if reverting this change on line 29 of the outputs.tf resolves it?

zaggash commented 3 months ago

I do not have time yet to work on it. I might be able to able to help on this a bit later