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

Question: How to specify the provider path for Terratest #565

Closed
virtualbubble opened this issue Jun 25, 2020 · 3 comments · Fixed by #787
Closed

Question: How to specify the provider path for Terratest #565

virtualbubble opened this issue Jun 25, 2020 · 3 comments · Fixed by #787
Labels
Core enhancement New feature or request good first issue Good for newcomers

Comments

@virtualbubble
Copy link

We do not have direct access to the internet to download the providers. Normally when we initialise Terraform we will use the following command:

terraform.exe init -plugin-dir=".\plugins"

Can we use TerraformOptions to specify a plugins directory that contains the required providers?

@yorinasub17 yorinasub17 added good first issue Good for newcomers Core enhancement New feature or request help wanted labels Jun 26, 2020
@yorinasub17
Copy link
Contributor

We don't currently have a first class option exposed to set this, but I don't see why we can't.

With that said, as a workaround, I think you can use TF_CLI_ARGS, set in EnvVars.

@virtualbubble
Copy link
Author

Thanks that worked for me.

@cbuto
Copy link
Contributor

cbuto commented Feb 11, 2021

I ran into this same issue and figured it would be pretty straight forward to support it as a configuration option.

I started on implementing it but i'm having a hard time figuring out the best way to implement a test that would be easy to maintain long term. Testing that the -plugin-dir option is actually working requires having pre-downloaded providers. I wrote a test that uses a fixture with a pre-downloaded provider but i don't think committing the actual provider binary to the repo is a viable solution.

Do you have any thoughts on how a test could be written for this @yorinasub17?

Edit: Moved this question to PR #787

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants