Skip to content

Commit

Permalink
fix invalid transform errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrykruglov committed Mar 4, 2025
1 parent 99319b2 commit 1a1e449
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
3 changes: 1 addition & 2 deletions provider/resource_entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-go/tftypes"
"github.com/tivo/terraform-provider-splunk-itsi/models"
"github.com/tivo/terraform-provider-splunk-itsi/util"
)
Expand Down Expand Up @@ -289,7 +288,7 @@ func (r *resourceEntity) Read(ctx context.Context, req resource.ReadRequest, res
return
}
if b == nil || b.RawJson == nil {
resp.State.Raw = tftypes.Value{}
resp.State.RemoveResource(ctx)
return
}

Expand Down
3 changes: 1 addition & 2 deletions provider/resource_entity_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-go/tftypes"
"github.com/tivo/terraform-provider-splunk-itsi/models"
"github.com/tivo/terraform-provider-splunk-itsi/util"
)
Expand Down Expand Up @@ -900,7 +899,7 @@ func (r *resourceEntityType) Read(ctx context.Context, req resource.ReadRequest,
return
}
if b == nil || b.RawJson == nil {
resp.State.Raw = tftypes.Value{}
resp.State.RemoveResource(ctx)
return
}

Expand Down
3 changes: 1 addition & 2 deletions provider/resource_kpi_base_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-go/tftypes"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/tivo/terraform-provider-splunk-itsi/models"
)
Expand Down Expand Up @@ -557,7 +556,7 @@ func (r *resourceKpiBaseSearch) Read(ctx context.Context, req resource.ReadReque
return
}
if b == nil || b.RawJson == nil {
resp.State.Raw = tftypes.Value{}
resp.State.RemoveResource(ctx)
return
}

Expand Down
3 changes: 1 addition & 2 deletions provider/resource_kpi_threshold_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-go/tftypes"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/tivo/terraform-provider-splunk-itsi/models"
"github.com/tivo/terraform-provider-splunk-itsi/util"
Expand Down Expand Up @@ -467,7 +466,7 @@ func (r *resourceKpiThresholdTemplate) Read(ctx context.Context, req resource.Re
return
}
if b == nil {
resp.State.Raw = tftypes.Value{}
resp.State.RemoveResource(ctx)
return
}

Expand Down
3 changes: 1 addition & 2 deletions provider/resource_neap.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts"
"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
"github.com/hashicorp/terraform-plugin-go/tftypes"

"github.com/hashicorp/terraform-plugin-framework-validators/int64validator"
"github.com/hashicorp/terraform-plugin-framework-validators/listvalidator"
Expand Down Expand Up @@ -1367,7 +1366,7 @@ func (r *resourceNEAP) Read(ctx context.Context, req resource.ReadRequest, resp
return
}
if b == nil || b.RawJson == nil {
resp.State.Raw = tftypes.Value{}
resp.State.RemoveResource(ctx)
return
}

Expand Down
3 changes: 1 addition & 2 deletions provider/resource_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-plugin-go/tftypes"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/tivo/terraform-provider-splunk-itsi/models"
"github.com/tivo/terraform-provider-splunk-itsi/util"
Expand Down Expand Up @@ -521,7 +520,7 @@ func (r *resourceService) Read(ctx context.Context, req resource.ReadRequest, re
return
}
if b == nil || b.RawJson == nil {
resp.State.Raw = tftypes.Value{}
resp.State.RemoveResource(ctx)
return
}

Expand Down

0 comments on commit 1a1e449

Please # to comment.