-
Notifications
You must be signed in to change notification settings - Fork 3
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
Environment variable config not working #26
Comments
Hi @jackmtpt, Fellow user here. Please could you post the provider block configuration you are using? Also the operating system your are working on. |
If I don't define a
I'm running on Windows, via PowerShell, with the env vars set locally. Adding this block makes it work:
but I want to read the values from the env vars, not hard-code them. My env vars from powershell:
|
In fact actually it looks like adding this provider block is sufficient to convince the provider to use the env vars:
So possibly the issue is that the validation is just too strict - it shouldn't require any value at all to provided if the env vars are present. |
What happens if you just put an empty provider block? provider "sonatypeiq" {} |
Sadly that doesn't work either - it just prompts me for the values. With
|
Thanks for providing the extra info I'll try to take a stab at fixing this with that extra information. I don't have a windows environment to test on but hopefully I can work it out |
terraform-provider-sonatypeiq/internal/provider/provider.go
Line 88 in d401422
Looking at that code it seems like it should be possible to configure the url/username/password via env vars, rather than requiring them to be in plain-text in the configuration files (which for security is obviously unacceptable).
Am I just doing something wrong or are they not meant to work for normal use, and only for the integration tests?
The text was updated successfully, but these errors were encountered: