@@ -2,6 +2,7 @@ package page
22
33import (
44 "context"
5+
56 "github.com/hashicorp/terraform-plugin-framework/path"
67 "github.com/hashicorp/terraform-plugin-framework/resource"
78 "github.com/hashicorp/terraform-plugin-framework/types"
@@ -142,14 +143,15 @@ func (r *PageResource) Create(ctx context.Context, req resource.CreateRequest, r
142143
143144func (r * PageResource ) Update (ctx context.Context , req resource.UpdateRequest , resp * resource.UpdateResponse ) {
144145 var state * PageModel
146+ var p * cli.Page
145147
146148 resp .Diagnostics .Append (req .Plan .Get (ctx , & state )... )
147149
148150 if resp .Diagnostics .HasError () {
149151 return
150152 }
151153
152- p , _ , err := r .portClient .GetPage (ctx , state .Identifier .ValueString ())
154+ _ , _ , err := r .portClient .GetPage (ctx , state .Identifier .ValueString ())
153155 if err != nil {
154156 resp .Diagnostics .AddError ("failed to get page" , err .Error ())
155157 return
@@ -161,7 +163,7 @@ func (r *PageResource) Update(ctx context.Context, req resource.UpdateRequest, r
161163 return
162164 }
163165
164- _ , err = r .portClient .UpdatePage (ctx , p .Identifier , page )
166+ p , err = r .portClient .UpdatePage (ctx , page .Identifier , page )
165167
166168 if err != nil {
167169 resp .Diagnostics .AddError ("failed to update page" , err .Error ())
0 commit comments