Skip to content

Commit 6568128

Browse files
committed
how did they merge it
1 parent 79a81c2 commit 6568128

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

castai/resource_edge_location.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ func (r *edgeLocationResource) Create(ctx context.Context, req resource.CreateRe
383383

384384
createReq := omni.EdgeLocationsAPICreateEdgeLocationJSONRequestBody{
385385
Name: plan.Name.ValueString(),
386-
Region: plan.Region.ValueString(),
386+
Region: lo.ToPtr(plan.Region.ValueString()),
387387
Zones: lo.ToPtr(r.toZones(plan.Zones)),
388388
}
389389

@@ -463,7 +463,9 @@ func (r *edgeLocationResource) Read(ctx context.Context, req resource.ReadReques
463463

464464
edgeLocation := apiResp.JSON200
465465

466-
state.Region = types.StringValue(edgeLocation.Region)
466+
if edgeLocation.Region != nil {
467+
state.Region = types.StringValue(*edgeLocation.Region)
468+
}
467469
state.Name = types.StringValue(edgeLocation.Name)
468470
state.Description = types.StringNull()
469471
if edgeLocation.Description != nil {

0 commit comments

Comments
 (0)