Skip to content

Commit 1410a63

Browse files
committed
Fix semgrep 'ci.semgrep.framework.import-state-passthrough-id'.
1 parent 8194c2e commit 1410a63

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/service/transfer/web_app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ func (r *webAppResource) Delete(ctx context.Context, request resource.DeleteRequ
277277
}
278278

279279
func (r *webAppResource) ImportState(ctx context.Context, request resource.ImportStateRequest, response *resource.ImportStateResponse) {
280-
response.Diagnostics.Append(response.State.SetAttribute(ctx, path.Root("web_app_id"), request.ID)...)
280+
resource.ImportStatePassthroughID(ctx, path.Root("web_app_id"), request, response)
281281
}
282282

283283
func findWebAppByID(ctx context.Context, conn *transfer.Client, id string) (*awstypes.DescribedWebApp, error) {

internal/service/transfer/web_app_customization.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func (r *webAppCustomizationResource) Delete(ctx context.Context, request resour
205205
}
206206

207207
func (r *webAppCustomizationResource) ImportState(ctx context.Context, request resource.ImportStateRequest, response *resource.ImportStateResponse) {
208-
response.Diagnostics.Append(response.State.SetAttribute(ctx, path.Root("web_app_id"), request.ID)...)
208+
resource.ImportStatePassthroughID(ctx, path.Root("web_app_id"), request, response)
209209
}
210210

211211
func findWebAppCustomizationByID(ctx context.Context, conn *transfer.Client, id string) (*awstypes.DescribedWebAppCustomization, error) {

0 commit comments

Comments
 (0)