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

Allow to configure a custom location used for local provider lookup during initialization #28494

Open
lucendio opened this issue Apr 22, 2021 · 2 comments
Labels
enhancement new new issue not yet triaged

Comments

@lucendio
Copy link

This is sort of a follow-up to #27166, even though it's is not about making a case specifically for terraform.d/ as requsted in the answer. This request is asking for customizing the location(s) that Terraform uses to discover providers locally on macOS.

Current Terraform Version

Terraform v0.15.0
on darwin_amd64

Use-cases

Re-use providers created (or forked) by others, that are not published on any registry, but only available either as pre-build or source code. In general, it would be great if the user has the freedom to choose how to manage dependencies and where to put them.

Attempted Solutions

Setting XDG_* variables, which is not supported for macOS or Windows. And of course, the workaround recommended in #27166: creating a symlink of terraform.d in the root module pointing to a preferred location somewhere in the local filesytem.

Proposal

Add darwin to this list so that not only the native macOS locations are being used to look up providers mentioned in terraform.required_providers, but custom user-defined location(s) as well.

Remark (1): Surely, for CD it's easier to provide a Linux context where XDG_* is being recognized, but it's also valuable to use the same code whether it's being executed on a workstation or in automation.

Remark (2): I didn't explicitly asked for Windows, but I suppose there is no harm in enabling it there, too. I would assume, people who set XDG_* do so intentionally.

References

@lucendio lucendio added enhancement new new issue not yet triaged labels Apr 22, 2021
@mildwonkey
Copy link
Contributor

Hi @lucendio ,
Terraform has several options for customizing provider installation methods, including which directories terraform should look in for local providers. Can you take a look at the provider_installation options in the cli configuration and see if those meet your use case?

If you have a use case which isn't met by those options, we'd love to hear more about those. Thanks!

@lucendio
Copy link
Author

lucendio commented May 1, 2021

Hi @mildwonkey,

provider-installation was the starting point of my research and trials. I would think that the technical aspects mentioned above would indicate that. Your response seems to imply otherwise. I'm wondering why. Are some parts of what I wrote not clear? If that's the caste, which ones? Maybe I can try and clarify :)

In my opinion, #27166 pretty much shows what the issue is. But, I may have overlooked sth in the docs (that you referred). If you could help me here and show me exactly which ways there are to configure the local location where custom providers can be installed from (on macOS). That would be much appreciated.

If you have a use case which isn't met by those options, we'd love to hear more about those. Thanks!

I did exactly that, by opening this issue. Please elaborate on what exactly you want to hear more about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new new issue not yet triaged
Projects
None yet
Development

No branches or pull requests

2 participants