Skip to content

Commit

Permalink
Instance Create: Ensure only ID is used to reference resources
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre-Emmanuel Jacquier <[email protected]>
  • Loading branch information
pierre-emmanuelJ committed Jul 24, 2024
1 parent cc09480 commit ce58594
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/instance_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (c *instanceCreateCmd) cmdRun(_ *cobra.Command, _ []string) error { //nolin
if err != nil {
return fmt.Errorf("error retrieving Deploy Target: %w", err)
}
instanceReq.DeployTarget = &deployTarget
instanceReq.DeployTarget = &v3.DeployTarget{ID: deployTarget.ID}
}

instanceTypes, err := client.ListInstanceTypes(ctx)
Expand Down Expand Up @@ -224,7 +224,7 @@ func (c *instanceCreateCmd) cmdRun(_ *cobra.Command, _ []string) error { //nolin
c.Zone,
)
}
instanceReq.Template = &template
instanceReq.Template = &v3.Template{ID: template.ID}

if c.CloudInitFile != "" {
userData, err := userdata.GetUserDataFromFile(c.CloudInitFile, c.CloudInitCompress)
Expand Down

0 comments on commit ce58594

Please sign in to comment.