Skip to content

Commit b79468a

Browse files
Add project id for reset ssh key for VM API (#12)
1 parent ff29c7c commit b79468a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cloudstack/resource_cloudstack_instance.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,10 @@ func resourceCloudStackInstanceUpdate(d *schema.ResourceData, meta interface{})
572572

573573
p := cs.SSH.NewResetSSHKeyForVirtualMachineParams(d.Id(), d.Get("keypair").(string))
574574

575+
// If there is a project supplied, we retrieve and set the project id
576+
if err := setProjectid(p, cs, d); err != nil {
577+
return err
578+
}
575579
// Change the ssh keypair
576580
_, err = cs.SSH.ResetSSHKeyForVirtualMachine(p)
577581
if err != nil {

0 commit comments

Comments
 (0)