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

Manage infrastructure from behind a proxy #523

Closed
kief opened this issue Oct 30, 2014 · 17 comments
Closed

Manage infrastructure from behind a proxy #523

kief opened this issue Oct 30, 2014 · 17 comments

Comments

@kief
Copy link

kief commented Oct 30, 2014

I'm working in an office that only allows outbound http/s connections via a proxy. This currently prevents use with AWS provider, and I assume others as well. It would be useful to have a way to configure terraform (command line and/or config files) with the proxy details.

Thanks

@Filirom1
Copy link
Contributor

+1

1 similar comment
@lgs
Copy link

lgs commented Nov 19, 2014

+1

@tkak
Copy link
Contributor

tkak commented Dec 26, 2014

+1

@wkielas
Copy link

wkielas commented Jan 19, 2015

As a temporary workaround I use iptables + redsocks to proxy outgoing terraform traffic, but real proxy support would be much better.

@ipolyzos
Copy link

ipolyzos commented Apr 1, 2015

+1

@justnom
Copy link
Contributor

justnom commented Jun 3, 2015

This is already supported natively by the Golang net/http package which aws-sdk-go uses.

To set an HTTP proxy just set either the HTTP_PROXY or HTTPS_PROXY environment variables.

On Windows:
set HTTP_PROXY=http://<your proxy address here>

On Mac/Linux:
export HTTP_PROXY=http://<your proxy address here>

Hope this helps :)

@phinze
Copy link
Contributor

phinze commented Jun 16, 2015

Yep @justnom is right - should be achievable via those environment variables.

@junessi
Copy link

junessi commented Feb 22, 2016

+1

2 similar comments
@spacemonkey
Copy link

+1

@ohmydata
Copy link

ohmydata commented May 7, 2016

+1

@mikesimons
Copy link

I'm trying to inspect traffic coming from terraform-openstack-provider to debug some auth issues (using https://www.charlesproxy.com/) and it's totally ignoring the env vars. These requests are not showing up in Charles.

env http_proxy=http://127.0.0.1:8888 HTTP_PROXY=http://127.0.0.1:8888 HTTPS_PROXY=http://127.0.0.1:8888 https_proxy=http://127.0.0.1:8888 terraform plan

Grabbing the pid of a plugin process (8586 here) and inspecting the environment before it shuts down...

s> xargs -n 1 -0 < /proc/8586/environ | grep -i proxy
HTTPS_PROXY=http://127.0.0.1:8888
HTTP_PROXY=http://127.0.0.1:8888
http_proxy=http://127.0.0.1:8888
https_proxy=http://127.0.0.1:8888

So the plugin is getting the vars but they're not being used.

I think the problem (at least in the case of the openstack provider) is that you're overriding the transport passed to gophercloud but not setting Proxy from the env like the DefaultTransport does.

Each provider needs checking to ensure that it's either using the default transport or setting the proxy on its custom transport (AWS for instance uses go-cleanhttp which correctly sets proxies from env).

@pmithrandir
Copy link

Hello,

I'm using terraform behind a proxy, and I don't think it's working for openstack.
I get a time out each time I'm trying to reach my openstack platform, even if when using heat command it works.

Pierre

@pierrecarre
Copy link

+1

@danielcoman
Copy link

Hello,

I'm currently testing terraform and I'm also not able to get it working behind a corporate proxy with the openstack provider.

Daniel

+1

@TG-KK
Copy link

TG-KK commented Mar 28, 2017

Not working with AWS provider too, even though variables are set

@kolly83
Copy link

kolly83 commented Aug 13, 2019

Hello

Same here. Not working with AWS provider too, even though variables are set.

Although I was able to get it work once with the export proxy.

Any idea?

Thank you.

@ghost
Copy link

ghost commented Aug 14, 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 Aug 14, 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