@@ -16,6 +16,7 @@ import (
16
16
"github.com/hashicorp/terraform-plugin-framework/types"
17
17
"github.com/jianyuan/go-sentry/v2/sentry"
18
18
"github.com/jianyuan/terraform-provider-sentry/internal/diagutils"
19
+ "github.com/jianyuan/terraform-provider-sentry/internal/tfutils"
19
20
)
20
21
21
22
type ProjectInboundDataFilterResourceModel struct {
@@ -28,7 +29,7 @@ type ProjectInboundDataFilterResourceModel struct {
28
29
}
29
30
30
31
func (m * ProjectInboundDataFilterResourceModel ) Fill (organization string , project string , filterId string , filter sentry.ProjectInboundDataFilter ) error {
31
- m .Id = types .StringValue (buildThreePartID (organization , project , filterId ))
32
+ m .Id = types .StringValue (tfutils . BuildThreePartId (organization , project , filterId ))
32
33
m .Organization = types .StringValue (organization )
33
34
m .Project = types .StringValue (project )
34
35
m .FilterId = types .StringValue (filterId )
@@ -125,7 +126,7 @@ func (r *ProjectInboundDataFilterResource) Create(ctx context.Context, req resou
125
126
return
126
127
}
127
128
128
- data .Id = types .StringValue (buildThreePartID (data .Organization .ValueString (), data .Project .ValueString (), data .FilterId .ValueString ()))
129
+ data .Id = types .StringValue (tfutils . BuildThreePartId (data .Organization .ValueString (), data .Project .ValueString (), data .FilterId .ValueString ()))
129
130
130
131
resp .Diagnostics .Append (resp .State .Set (ctx , & data )... )
131
132
}
@@ -204,7 +205,7 @@ func (r *ProjectInboundDataFilterResource) Update(ctx context.Context, req resou
204
205
return
205
206
}
206
207
207
- plan .Id = types .StringValue (buildThreePartID (plan .Organization .ValueString (), plan .Project .ValueString (), plan .FilterId .ValueString ()))
208
+ plan .Id = types .StringValue (tfutils . BuildThreePartId (plan .Organization .ValueString (), plan .Project .ValueString (), plan .FilterId .ValueString ()))
208
209
209
210
resp .Diagnostics .Append (resp .State .Set (ctx , & plan )... )
210
211
}
@@ -236,7 +237,7 @@ func (r *ProjectInboundDataFilterResource) Delete(ctx context.Context, req resou
236
237
}
237
238
238
239
func (r * ProjectInboundDataFilterResource ) ImportState (ctx context.Context , req resource.ImportStateRequest , resp * resource.ImportStateResponse ) {
239
- organization , project , filterID , err := splitThreePartID (req .ID , "organization" , "project-slug" , "filter-id" )
240
+ organization , project , filterID , err := tfutils . SplitThreePartId (req .ID , "organization" , "project-slug" , "filter-id" )
240
241
if err != nil {
241
242
resp .Diagnostics .Append (diagutils .NewImportError (err ))
242
243
return
0 commit comments