devopsarr / terraform-provider-prowlarr

Terraform Prowlarr provider
https://registry.terraform.io/providers/devopsarr/prowlarr
Mozilla Public License 2.0
5 stars 1 forks source link

Fail to import #148

Closed n4zmz closed 2 months ago

n4zmz commented 1 year ago

Sonarr/Radarr are working fine. Prowlarr is failing to import anything I specify.

DENNISs-Mac-mini:terraform dennis$ terraform -v Terraform v1.4.6 on darwin_amd64

Prowlarr version: 1.3.1.2796

Example below

DENNISs-Mac-mini:terraform dennis$ terraform import prowlarr_download_client.prowlarr-nzbget 1 prowlarr_download_client.prowlarr-nzbget: Importing from ID "1"... prowlarr_download_client.prowlarr-nzbget: Import prepared! Prepared prowlarr_download_client for import prowlarr_download_client.prowlarr-nzbget: Refreshing state... data.vsphere_datacenter.dc: Reading... data.vsphere_datacenter.dc: Read complete after 0s [id=datacenter-1001] data.vsphere_compute_cluster.cluster: Reading... data.vsphere_network.network: Reading... data.vsphere_datastore.datastore: Reading... data.vsphere_network.network: Read complete after 0s [id=network-1011] data.vsphere_compute_cluster.cluster: Read complete after 0s [id=domain-c1018] data.vsphere_datastore.datastore: Read complete after 0s [id=datastore-2002] ╷ │ Error: Client Error │ │ Unable to read download_client, got error: 404 Not Found │ Details: │ { │ "message": "DownloadClientDefinition with ID 1 does not exist", │ "description": "NzbDrone.Core.Datastore.ModelNotFoundException: DownloadClientDefinition with ID 1 does not exist\n at NzbDrone.Core.Datastore.BasicRepository\u00601.Get(Int32 id) in D:\a\1\s\src\NzbDrone.Core\Datastore\BasicRepository.cs:line 96\n at Prowlarr.Api.V1.ProviderControllerBase\u00603.GetResourceById(Int32 id) in D:\a\1\s\src\Prowlarr.Api.V1\ProviderControllerBase.cs:line 37\n at lambda_method323(Closure , Object , Object[] )\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()\n--- End of stack trace from previous location ---\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State\u0026 next, Scope\u0026 scope, Object\u0026 state, Boolean\u0026 isCompleted)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()\n--- End of stack trace from previous location ---\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeFilterPipelineAsync\u003EgAwaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003Eg__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\u003CInvokeAsync\u003EgAwaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.\u003CInvoke\u003Eg__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)\n at Prowlarr.Http.Middleware.BufferingMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Prowlarr.Http\Middleware\BufferingMiddleware.cs:line 28\n at Prowlarr.Http.Middleware.IfModifiedMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Prowlarr.Http\Middleware\IfModifiedMiddleware.cs:line 41\n at Prowlarr.Http.Middleware.CacheHeaderMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Prowlarr.Http\Middleware\CacheHeaderMiddleware.cs:line 33\n at Prowlarr.Http.Middleware.StartingUpMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Prowlarr.Http\Middleware\StartingUpMiddleware.cs:line 38\n at Prowlarr.Http.Middleware.UrlBaseMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Prowlarr.Http\Middleware\UrlBaseMiddleware.cs:line 27\n at Prowlarr.Http.Middleware.VersionMiddleware.InvokeAsync(HttpContext context) in D:\a\1\s\src\Prowlarr.Http\Middleware\VersionMiddleware.cs:line 28\n at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)\n at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\n at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.\u003CInvoke\u003Eg__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)" │ } ╵

Fuochi commented 1 year ago

Hi @n4zmz, Thanks for opening the issue. I'll have a look in the next few days. Still, it's a weird error because this should be checked by the acceptance tests, and the 404 response is coming from prowlarr itself. I'll try to replicate and come back to you.

Fuochi commented 1 year ago

Hi @n4zmz, I have some trouble in replicating your issue. Are you experiencing the same across different resources, or is it just for download clients?

Also, can you please doublecheck the resource ID? You can do that using something similar:

data "prowlarr_download_clients" "this" {
}

output "ids" {
  value = nonsensitive(data.prowlarr_download_clients.this.download_clients.*.id)
}

It should output the IDs of your download clients. If they are different from the ones you tried before, use them.

Fuochi commented 1 year ago

Hi @n4zmz, Did you manage to get at the bottom of this?

n4zmz commented 1 year ago

No.  With no indexer support, I moved on to other issues with my infrastructure as code components.  But I need to get back to this as I am still running a Prowlarr chart from TrueCharts which can’t be upgraded.Sent from my iPadOn May 31, 2023, at 4:45 AM, Fuochi @.***> wrote: Hi @n4zmz, Did you manage to get at the bottom of this?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Fuochi commented 2 months ago

Hi @n4zmz, If you don't have anything to add here, I'll close this ticket by the end of the week.

Fuochi commented 2 months ago

closing since there is no update.