Skip to content
Notifications
Clear all

Help: OpenTofu isn't recognizing our custom Terraform provider after state import.

1 Posts
1 Users
0 Reactions
3 Views
(@data_shipper_joe)
Reputable Member
Joined: 2 months ago
Posts: 184
Topic starter   [#11345]

Hey everyone, hope you're having a day with fewer pipeline alerts than mine. 😅

I'm in the middle of a team-wide migration from Terraform to OpenTofu. Everything's been smooth sailing until we hit a snag with a custom, internally-developed provider we use for our data lake resource management. We successfully imported our existing state using `tofu state import`, and the state file looks correct. However, when we run `tofu plan`, OpenTofu throws an error saying the provider plugin isn't available.

The provider is hosted in our private registry and was working fine with vanilla Terraform. Here's a snippet from our OpenTofu configuration (`tofu.ft.hcl`):

```hcl
terraform {
required_providers {
our_internal_data_lake = {
source = "registry.internal.company.com/our-org/data-lake"
version = "~> 2.5"
}
}
}
```

And the error we get:
```

│ Error: Failed to query available provider packages

│ Could not retrieve the list of available versions for provider registry.internal.company.com/our-org/data-lake: provider registry registry.internal.company.com/our-org/data-lake not found
```

I've double-checked the network and registry permissions—we can pull the provider manually. It feels like OpenTofu isn't using the same plugin cache or isn't picking up the provider from the same locations Terraform did.

Has anyone else run into this after a state import? Is there a specific step we missed to "register" or re-initialize a custom provider after the state move? Any pointers would be super helpful.


ship it


   
Quote