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

ssh key resources #65

Open
scippio opened this issue Jul 4, 2019 · 3 comments
Open

ssh key resources #65

scippio opened this issue Jul 4, 2019 · 3 comments

Comments

@scippio
Copy link

scippio commented Jul 4, 2019

Please add resource for ssh key/s... thank you.

@PopoSensei
Copy link
Contributor

Hello,

While creating a server you can add login block, which can be changed without destroying the server, though removing it all together will result in a destroy and recreate process.

So maybe my question is, for what would you need a seperate ssh key/s resource? Or maybe I answered your question?

login block example:

  # Login details
  login {
    user = "myusername"

    keys = [
      "<YOUR SSH PUBLIC KEY>",
    ]

    create_password   = true
    password_delivery = "sms"
  }

@bbros-dev
Copy link

bbros-dev commented Oct 28, 2020

TLDR;

So maybe my question is, for what would you need a seperate ssh key/s resource?

To reuse the code written for other cloud providers.

Long winded:
@PopoSensei, that workaround is useful, and even a complete solution in some use cases (no-longer a workaround).

In our case we use multiple cloud vendors and to keep things managable we need to use the same code path as much as possible - in just our bootstrap module (3-cloud providers) right now we have 6,698 lines in Terraform/HCL files with 191 occurrences of ssh_key*

It simply isn't feasible to economically re-engineer everything in the way you suggest. The cost in developer cycles will be orders of magnitude larger than the saving from using Upcloud.

Most of the other Terraform resources differences we think we can work around, but not this one.

Since the issue is open we think that means upcloud may consider adding a ssh keypair resource?
We hope so we need a European provider, right now it looks like Exoscale or Scaleway.

@kaminek
Copy link
Contributor

kaminek commented May 28, 2021

Hello,
The current API design don't allow managing ssh keys as a resource, it can be only set on server creation resource if implemented with the current version(so that could trigger a delete/start of server resource if updated).

This probably will take some time to be implemented properly.

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

No branches or pull requests

5 participants