diff --git a/hostingde/record_resource.go b/hostingde/record_resource.go index fceb9a0..aaf00a6 100644 --- a/hostingde/record_resource.go +++ b/hostingde/record_resource.go @@ -31,13 +31,13 @@ type recordResource struct { // recordResourceModel maps the DNSRecord resource schema data. type recordResourceModel struct { - ID types.String `tfsdk:"id"` - ZoneID types.String `tfsdk:"zone_id"` - Name types.String `tfsdk:"name"` - Type types.String `tfsdk:"type"` - Content types.String `tfsdk:"content"` - TTL types.Int64 `tfsdk:"ttl"` - Priority types.Int64 `tfsdk:"priority"` + ID types.String `tfsdk:"id"` + ZoneID types.String `tfsdk:"zone_id"` + Name types.String `tfsdk:"name"` + Type types.String `tfsdk:"type"` + Content types.String `tfsdk:"content"` + TTL types.Int64 `tfsdk:"ttl"` + Priority types.Int64 `tfsdk:"priority"` } // Metadata returns the resource type name. @@ -215,13 +215,13 @@ func (r *recordResource) Update(ctx context.Context, req resource.UpdateRequest, // Generate API request body from plan record := DNSRecord{ - Name: plan.Name.ValueString(), - ID: plan.ID.ValueString(), - ZoneID: plan.ZoneID.ValueString(), - Type: plan.Type.ValueString(), - Content: plan.Content.ValueString(), - TTL: int(plan.TTL.ValueInt64()), - Priority: int(plan.Priority.ValueInt64()), + Name: plan.Name.ValueString(), + ID: plan.ID.ValueString(), + ZoneID: plan.ZoneID.ValueString(), + Type: plan.Type.ValueString(), + Content: plan.Content.ValueString(), + TTL: int(plan.TTL.ValueInt64()), + Priority: int(plan.Priority.ValueInt64()), } recordReq := RecordsUpdateRequest{ @@ -258,7 +258,6 @@ func (r *recordResource) Update(ctx context.Context, req resource.UpdateRequest, plan.Priority = types.Int64Value(int64(returnedRecord.Priority)) } - diags = resp.State.Set(ctx, plan) resp.Diagnostics.Append(diags...) if resp.Diagnostics.HasError() {