Skip to content

Commit 65e20e8

Browse files
authored
Merge pull request scaleway#110 from azuenko/master
Ignore leading and trailing whitespaces when adding public SSH key
2 parents 0dd36bc + 95f4d6e commit 65e20e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scaleway/resource_ssh_key.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func resourceScalewaySSHKeyCreate(d *schema.ResourceData, m interface{}) error {
6767

6868
user, err = scaleway.PatchUserSSHKey(user.ID, api.UserPatchSSHKeyDefinition{
6969
SSHPublicKeys: append(keys, api.KeyDefinition{
70-
Key: d.Get("key").(string),
70+
Key: strings.TrimSpace(d.Get("key").(string)),
7171
}),
7272
})
7373

0 commit comments

Comments
 (0)