Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k3s on AWS fails if create_ssh_key_pair = true ? #119

Open
zaggash opened this issue May 6, 2024 · 2 comments
Open

k3s on AWS fails if create_ssh_key_pair = true ? #119

zaggash opened this issue May 6, 2024 · 2 comments

Comments

@zaggash
Copy link

zaggash commented May 6, 2024

│ 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
Copy link
Contributor

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
Copy link
Author

zaggash commented May 23, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants