Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for registeries other than registry.terraform.io #1840

Open
Nullreff opened this issue Jan 29, 2024 · 2 comments
Open

Support for registeries other than registry.terraform.io #1840

Nullreff opened this issue Jan 29, 2024 · 2 comments

Comments

@Nullreff
Copy link

Right now the provider registry is hard coded as registry.terraform.io when looking up providers. For anyone using alternative registries such as registry.opentofu.org or self hosting their own registry, this causes terraformer to fail with an error similar to:

2024/01/29 01:39:14 aws importing default region
2024/01/29 01:39:14 open /home/nullreff/.terraform.d/plugins/linux_amd64: no such file or directory

which is rather hard to track down what's going wrong. Possible fixes I can thing of might be:

  • Support a CLI flag or configuration option to pick which registry to use
  • Search all the registries in the plugins directory for the provider we're looking for
  • If the default registry isn't found, prompt the user to pick from any others found

As for workarounds, the best way I've found is to symlink the expected provider directory to the one you're using.
For example using registry.opentofu.org:

ln -s ~/.terraform.d/plugins/registry.opentofu.org/ ~/.terraform.d/plugins/registry.terraform.io

However I wouldn't recommend this if you're using a mix of registries as they'll now be installed into the same directory.

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Mar 30, 2024
@Nullreff
Copy link
Author

Still an issue

@github-actions github-actions bot removed the Stale label Apr 2, 2024
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

No branches or pull requests

1 participant