Skip to content

Use input registry to fetch provider spec#1

Draft
etinquis wants to merge 1 commit into
TECHNOFAB11:mainfrom
etinquis:main
Draft

Use input registry to fetch provider spec#1
etinquis wants to merge 1 commit into
TECHNOFAB11:mainfrom
etinquis:main

Conversation

@etinquis

Copy link
Copy Markdown

registry.opentofu.org was previously hardcoded in spec fetch, causing errors if the provider is not in both the input registry and opentofu's (not to mention potential version differences between the two).

On top of this, something in the packing process is placing the binaries from a non-opentofu-registry provider into the registry.opentofu.org directory under terraform-providers, causing errors trying to find the provider again.

e.g.:

# provider package
ls -lah /nix/store/lfx8k2gqn04wiy91skq7sqd3zbrmi1hp-terraform-provider-mssql-0.1.0/libexec/terraform-providers/
dr-xr-xr-x 3 root root 4.0K Dec 31  1969 registry.terraform.io
ls -lah /nix/store/lfx8k2gqn04wiy91skq7sqd3zbrmi1hp-terraform-provider-mssql-0.1.0/libexec/terraform-providers/registry.terraform.io/
dr-xr-xr-x 3 root root 4.0K Dec 31  1969 etinquis
# as expected, package is pulled from registry.terraform.io
# final composite package of all providers
ls -lah /nix/store/gq799dg9xw50fzxx0w0ask84q998yndw-opentofu-1.10.9/libexec/terraform-providers
dr-xr-xr-x 4 root root 4.0K Dec 31  1969 registry.opentofu.org
ls -lah /nix/store/gq799dg9xw50fzxx0w0ask84q998yndw-opentofu-1.10.9/libexec/terraform-providers/registry.opentofu.org/
dr-xr-xr-x 3 root root 4.0K Dec 31  1969 etinquis
dr-xr-xr-x 4 root root 4.0K Dec 31  1969 hashicorp
# I'd expect both registry.opentofu.org and registry.terraform.io to be present

I didn't make it deep enough in the source to determine where the second problem is coming from, I've just short-circuited it by removing the special casing for registry provided vs not provided when removing the registry part (meaning, in short, that all providers are expected to be 'normalized' to appear to be pulled from registry.opentofu.org in the consolidated package, matching the observed current behavior). I don't stand by this fix, you will know better how to fix it such that both registries are reflected in the output, should you want to do that.

@etinquis

etinquis commented Apr 10, 2026

Copy link
Copy Markdown
Author

The provider that will reproduce the issues is etinquis/mssql 0.1.0, which is not in the opentofu registry (https://registry.terraform.io/providers/etinquis/mssql/latest).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant