Skip to content

Commit

Permalink
Merge pull request scaleway#110 from azuenko/master
Browse files Browse the repository at this point in the history
Ignore leading and trailing whitespaces when adding public SSH key
  • Loading branch information
nicolai86 authored Feb 15, 2019
2 parents 0dd36bc + 95f4d6e commit 65e20e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scaleway/resource_ssh_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func resourceScalewaySSHKeyCreate(d *schema.ResourceData, m interface{}) error {

user, err = scaleway.PatchUserSSHKey(user.ID, api.UserPatchSSHKeyDefinition{
SSHPublicKeys: append(keys, api.KeyDefinition{
Key: d.Get("key").(string),
Key: strings.TrimSpace(d.Get("key").(string)),
}),
})

Expand Down

0 comments on commit 65e20e8

Please sign in to comment.