ionos-cloud / terraform-provider-ionoscloud

The IonosCloud Terraform provider gives the ability to deploy and configure resources using the IonosCloud APIs.
Mozilla Public License 2.0
34 stars 23 forks source link

Changing SSH keys on running Maschine #291

Closed Syndlex closed 2 years ago

Syndlex commented 2 years ago

Current Provider Version

"6.2.3"

Use-cases

Adding new SSH keys to ionoscloud_server.ssh_key_path does not update authorized_keys on running Maschine.

Additional information we do not allow root group login into our Maschine.

Attempted Solutions

use ssh-copy-id manually

Proposal

Adding new SSH keys to a running Maschine should update authorized keys on running Maschine

benschmi commented 2 years ago

Hi Marcel,

there is no functionality in IONOS Cloud to change the SSH key inside an existing volume. A SSH key can only be injected during creation time and not at a later stage. Therefore, this feature also cannot be implemented inside the IONOS Terraform provider.

The only solution at the moment is to use ssh-copy-id or update the authorized_keys file manually.

Kind Regards, Ben