opensearch-project / terraform-provider-opensearch

https://registry.terraform.io/providers/opensearch-project/opensearch
Apache License 2.0
73 stars 56 forks source link

[FEATURE] Support *_PROXY env variables #137

Open DenisBY opened 8 months ago

DenisBY commented 8 months ago

Is your feature request related to a problem?

I tried to debug the provider using mitm proxy with HTTPS_PROXY=http://localhost:8080 terraform apply and was very confused when I didn't find any connections to OS from the provider until I specified proxy= option in config

What solution would you like?

The provider should support proxy config from *_PROXY env variables beside proxy= option

prudhvigodithi commented 8 months ago

[Untriage] Hey @DenisBY can you please share the full config (the .tf file you are using?) is the OS cluster behind a reverse proxy or you are trying to access the cluster thought a proxy ? Adding @timwisbauer-contsec as we contributed the proxy support feature. Thank you

DenisBY commented 7 months ago

Hi. I was trying to debug one thing and used MITM proxy via HTTPS_PROXY=http://localhost:8080 terraform apply command and was wonder, why I can see connections only from terraform itself and from aws provider and nothing from opensearch provider. And only after some digging, I found that I need to explicitly set proxy= in config for OS provider. It would be nice if OS provider also check for *_PROXY variables and get proxy settings from there if found.

prudhvigodithi commented 7 months ago

Hey @DenisBY the proxy feature was actually contributed in this PR https://github.com/opensearch-project/terraform-provider-opensearch/pull/95, can you please check if you can enhance to use HTTPS_PROXY variable. Adding @timwisbauer-contsec. Thank you