Skip to content

Commit

Permalink
[bugfix] fix smartxworks#18 Provider created content_library_vm_templ…
Browse files Browse the repository at this point in the history
…ate successfully but produced an unexpected new value.
  • Loading branch information
Xiritianming committed Nov 19, 2024
1 parent a35fb8a commit b8c9249
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/provider/resource_content_library_vm_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func resourceContentLibraryVmTemplateCreate(ctx context.Context, d *schema.Resou
}
templates = response.Payload
} else {
return diag.FromErr((fmt.Errorf("must set src_vm_id")))
return diag.FromErr(fmt.Errorf("must set src_vm_id"))
}
d.SetId(*templates[0].Data.ID)
_, err := ct.WaitTasksFinish([]string{*templates[0].TaskID})
Expand All @@ -213,7 +213,9 @@ func resourceContentLibraryVmTemplateRead(ctx context.Context, d *schema.Resourc
gvtp := vm_template.NewGetVMTemplatesParams()
gvtp.RequestBody = &models.GetVMTemplatesRequestBody{
Where: &models.VMTemplateWhereInput{
ID: &id,
ContentLibraryVMTemplate: &models.ContentLibraryVMTemplateWhereInput{
ID: &id,
},
},
}
vmTemplates, err := ct.Api.VMTemplate.GetVMTemplates(gvtp)
Expand Down

0 comments on commit b8c9249

Please sign in to comment.