Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit e38008b
Author: polatengin <enpolat@microsoft.com>
Date:   Mon Jun 3 13:49:56 2024 -0700

    fixing read

commit ac99f6b
Author: polatengin <enpolat@microsoft.com>
Date:   Mon Jun 3 13:49:07 2024 -0700

    fixing read

commit 948b8d3
Author: polatengin <enpolat@microsoft.com>
Date:   Mon Jun 3 13:47:38 2024 -0700

    fixing read

commit c8d5fca
Author: polatengin <enpolat@microsoft.com>
Date:   Mon Jun 3 12:15:55 2024 -0700

    fixing relation issues

commit 8aced1c
Author: polatengin <enpolat@microsoft.com>
Date:   Thu May 30 15:15:48 2024 -0700

    improving apply logic

commit 01e9d1a
Merge: a1df161 38c6bb5
Author: Engin Polat <polatengin@hotmail.com>
Date:   Thu May 30 13:17:54 2024 -0700

    Merge branch 'main' into enpolat/45-resource-powerplatform_data_record

commit 38c6bb5
Author: mawasile <50197777+mawasile@users.noreply.github.com>
Date:   Thu May 30 19:01:31 2024 +0200

    resource deletions outside terraform state should not end with an error when using terraform refresh (#316)

    * fix: handle 404 correctly

    * Update internal/powerplatform/services/solution/api_solution.go

    Co-authored-by: Matt Dotson <mattdot@users.noreply.github.com>

    ---------

    Co-authored-by: Matt Dotson <mattdot@users.noreply.github.com>

commit 68c5376
Author: Matt Dotson <mattdot@users.noreply.github.com>
Date:   Thu May 30 09:57:20 2024 -0700

    Fix broken documentation links (#315)

    * fixes #314 with documentation updates and culture removal

    * more fixes
  • Loading branch information
mawasile committed Jun 3, 2024
1 parent 117e237 commit a173cae
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-log/tflog"
api "github.com/microsoft/terraform-provider-power-platform/internal/powerplatform/api"
powerplatform_helpers "github.com/microsoft/terraform-provider-power-platform/internal/powerplatform/helpers"
)

func NewDataRecordResource() resource.Resource {
Expand Down Expand Up @@ -150,6 +151,10 @@ func (r *DataRecordResource) Read(ctx context.Context, req resource.ReadRequest,

newColumns, err := r.DataRecordClient.GetDataRecord(ctx, state.Id.ValueString(), state.EnvironmentId.ValueString(), state.TableLogicalName.ValueString())
if err != nil {
if powerplatform_helpers.Code(err) == powerplatform_helpers.ERROR_OBJECT_NOT_FOUND {
resp.State.RemoveResource(ctx)
return
}
resp.Diagnostics.AddError(fmt.Sprintf("Client error when reading %s", r.ProviderTypeName), err.Error())
return
}
Expand Down

0 comments on commit a173cae

Please sign in to comment.