Update SDK dependency (#177)

* Update dependencies

* Update dependencies

* Update dependencies

* Update dependencies

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
This commit is contained in:
Henrique Santos 2023-12-21 09:33:36 +00:00 committed by GitHub
parent 506d1afdc2
commit c7effac5c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 382 additions and 382 deletions

View file

@ -398,12 +398,12 @@ func (r *zoneResource) Update(ctx context.Context, req resource.UpdateRequest, r
return
}
// Update existing zone
_, err = r.client.UpdateZone(ctx, projectId, zoneId).UpdateZonePayload(*payload).Execute()
_, err = r.client.PartialUpdateZone(ctx, projectId, zoneId).PartialUpdateZonePayload(*payload).Execute()
if err != nil {
core.LogAndAddError(ctx, &resp.Diagnostics, "Error updating zone", fmt.Sprintf("Calling API: %v", err))
return
}
waitResp, err := wait.UpdateZoneWaitHandler(ctx, r.client, projectId, zoneId).WaitWithContext(ctx)
waitResp, err := wait.PartialUpdateZoneWaitHandler(ctx, r.client, projectId, zoneId).WaitWithContext(ctx)
if err != nil {
core.LogAndAddError(ctx, &resp.Diagnostics, "Error updating zone", fmt.Sprintf("Zone update waiting: %v", err))
return
@ -574,12 +574,12 @@ func toCreatePayload(model *Model) (*dns.CreateZonePayload, error) {
}, nil
}
func toUpdatePayload(model *Model) (*dns.UpdateZonePayload, error) {
func toUpdatePayload(model *Model) (*dns.PartialUpdateZonePayload, error) {
if model == nil {
return nil, fmt.Errorf("nil model")
}
return &dns.UpdateZonePayload{
return &dns.PartialUpdateZonePayload{
Name: conversion.StringValueToPointer(model.Name),
ContactEmail: conversion.StringValueToPointer(model.ContactEmail),
Description: conversion.StringValueToPointer(model.Description),