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

Simplify distribution of external providers #21565

Closed
remilapeyre opened this issue Jun 3, 2019 · 3 comments
Closed

Simplify distribution of external providers #21565

remilapeyre opened this issue Jun 3, 2019 · 3 comments

Comments

@remilapeyre
Copy link
Contributor

Hi!

I would like to propose to add a new registry provider that would let users fetch providers from another registry than registry.terraform.io, here's an example of its use:

provider "my_external_provider" {
    registry = "registry.my_company.com"
}

The registry at registry.my_company.com would need to present an appropriate .well-known/terraform.json and to have the same file structure than registry.terraform.io.

Basic authentication could be possible by setting a TERRAFORM_REGISTRY_registry.my_company.com environment variable or a variable in the .terraformrc file.

This would simplify use and distribution of Terraform providers that do not meet the requirements to be integrated to the official registry, most of the time, those must currently be cloned and compiled or binaries must be downloaded somewhere on the web and put in the appropriate place. I would personally use this feature to:

  • provide beta releases of the Consul provider so that users can try them and report issues before official release,
  • distribute open-source providers that are not stable yet,
  • distribute providers that are internal to an organization.

If this is accepted, I would be happy to work on a patch to add this.

@apparentlymart
Copy link
Contributor

Hi @remilapeyre! Thanks for opening this feature request.

The use-case you're describing here is represented by #15252, where you can find some comments from me about progress towards it. In particular, we switched to using the default registry (registry.terraform.io) in Terraform v0.12 as an initial step towards installing from other registries in a future release.

Based on investigation so far, it seems most likely that this will be done by some means other than a new argument in the provider block because providers are a global concept and so we need a way to override the source of a provider for the entire configuration, not just for one provider block in one module. Prototyping and design for that is in progress as I write this, so it's not yet totally figured out but we'll share more information over in #15252 once we have it.

Since this use-case is already represented by #15252, I'm going to close this one out just to consolidate the discussion. Thanks again for opening this!

@remilapeyre
Copy link
Contributor Author

Thanks, I don't know how I missed this!

@ghost
Copy link

ghost commented Jul 25, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants