Skip to content

[Bug]: Unable to retrieve SSH keys containing a space #811

@alexandrevoilab

Description

@alexandrevoilab

Current Behavior

I'm unable to retrieve an SSH key that was created with a space in its name.

It also impact the terraform provider, which prevent us from doing any work related to terraform.

I can't say exactly when the change happened, but the last successful terrafrom state change on our side was in September 2025.

I went bask as far as exo CLI 1.78.0 with the same error, so it must be an API change rather than a CLI change.
Most of the SSH keys where created years ago using either the web interface or terraform.
No changes where made to the SSH keys since they where created.
Everything was working at least until September.

Keys can't be modified, so we can't rename them.
And, last time I checked, keys couldn't be deleted when they are used, making terraform unusable.

Expected Behavior

Expect ssh keys to be retreivable with exo api get-ssh-key, exo compute ssh-key show or terraform.

Steps To Reproduce

It's no longer possible to create keys with space in their name. Hence hard to reproduce.

CLI Version

exo 1.93.0 9065c1a (egoscale v3.1.30)

Os platform

Gentoo Linux (rolling)

Relevant log output

% exo api list-ssh-keys
{
  "ssh-keys": [
    {
      "fingerprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "name": "Alexandre Voilab"
    }
  ]
}

% exo api get-ssh-key "Alexandre Voilab"
FATAL x.gen.go:23150 Error calling operation
HTTP 500: {"message":"server error"}

% exo compute ssh-key show "Alexandre Voilab"
error: GetSSHKey: http client do: Get "https://api-ch-gva-2.exoscale.com/v2/ssh-key/Alexandre%20Voilab": GET https://api-ch-gva-2.exoscale.com/v2/ssh-key/Alexandre%20Voilab giving up after 5 attempt(s)


# Terraform

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: Get "https://api-ch-gva-2.exoscale.com/v2/ssh-key/Alexandre%20Voilab": GET https://api-ch-gva-2.exoscale.com/v2/ssh-key/Alexandre%20Voilab giving up after 5 attempt(s)
│
│   with exoscale_ssh_key.alexandre,
│   on main.tf line 6, in resource "exoscale_ssh_key" "alexandre":
│    6: resource "exoscale_ssh_key" "alexandre" {
│
╵

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions