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

The s3 backend does not respect the NO_PROXY variable #675

Closed
Yantrio opened this issue Oct 6, 2023 · 1 comment · Fixed by #896
Closed

The s3 backend does not respect the NO_PROXY variable #675

Yantrio opened this issue Oct 6, 2023 · 1 comment · Fixed by #896
Assignees
Labels
accepted This issue has been accepted for implementation. bug Something isn't working

Comments

@Yantrio
Copy link
Member

Yantrio commented Oct 6, 2023

OpenTofu Version

1.6.0

OpenTofu Configuration Files

terraform {
  backend "s3" {
    bucket="tf-state-test"
    region="eu-central-1"
    key="test/test.tfstate"
  }
}

Debug Output

External gist link: Debug Output

Expected Behavior

OpenTofu should respect the NO_PROXY environment variable, specifically for requests to http://169.254.169.254. The NO_PROXY variable is set as follows:

export NO_PROXY="169.254.169.254"

Actual Behavior

OpenTofu only honors HTTP_PROXY and HTTPS_PROXY variables, ignoring the NO_PROXY setting. As a result, certain local requests use a proxy when they shouldn't.

Steps to Reproduce

  1. Run terraform init

Additional Context

export HTTP_PROXY="http://proxy:3128"
export HTTPS_PROXY="http://proxy:3128"
export NO_PROXY="169.254.169.254"

References

@cube2222 cube2222 added accepted This issue has been accepted for implementation. bug Something isn't working labels Nov 9, 2023
@tarruda
Copy link
Contributor

tarruda commented Nov 9, 2023

Even though the issue appears to be in aws-sdk-go-base, we can probably fix this locally by resetting the HTTP_PROXY /HTTPS_PROXY env vars if NO_PROXY is set. I can investigate/tackle this one @cube2222 (I had misunderstood the meaning of NO_PROXY, so this won't work)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted This issue has been accepted for implementation. bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants