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

provider is not using HTTPS_PROXY variable #2239

Closed
4 tasks done
sinc59 opened this issue Jul 19, 2024 · 3 comments
Closed
4 tasks done

provider is not using HTTPS_PROXY variable #2239

sinc59 opened this issue Jul 19, 2024 · 3 comments
Labels
bug Type: Bug needs-triage Status: Issue Needs Triage

Comments

@sinc59
Copy link

sinc59 commented Jul 19, 2024

Community Guidelines

  • I have read and agree to the HashiCorp Community Guidelines .
  • Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
  • Do not leave "+1" or other comments that do not add relevant information or questions.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Terraform

v1.6.1

Terraform Provider

2.8.2

VMware vSphere

7.0.3.01900

Description

Hello,
I access to the vsphere server using a corporate proxy.
When i run terraform, i get a timeout error:

│ Error: error setting up new vSphere SOAP client: Post "https://xxx.xxx.xxx.xxx/sdk": dial tcp 10.195.7.5:443: connect: connection timed out

The vsphere provider seems to not use the HTTPS_PROXY env var.
For exemple, Govmomi have fix this issue in the following commit.

Best regards,
Sébastien

Affected Resources or Data Sources

All ressources

Terraform Configuration

provider "vsphere" {
alias = "DC01"
user = xxxx
password = xxxx
vsphere_server = xxxx

We have self-signed cert on almost all of our vshpere hosts

allow_unverified_ssl = true
}

Debug Output

https://gist.github.com/sinc59/0ada82d2478e33649eb9f93fa9c4acd9

Panic Output

No response

Expected Behavior

vpshere provider following the HTTPS_PROXY env var

Actual Behavior

vsphere provider does not use HTTPS_PROXY env var

Steps to Reproduce

Set the HTTPS_PROXY env var:
HTTPS_PROXY="127.0.0.1:3128"

Environment Details

No response

Screenshots

No response

References

No response

@sinc59 sinc59 added bug Type: Bug needs-triage Status: Issue Needs Triage labels Jul 19, 2024
Copy link

Hello, sinc59! 🖐

Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.

If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.

@spacegospod
Copy link
Collaborator

@sinc59 it seems to me that the actual problem you're facing is with accessing vCenter at a custom HTTPS port.

While it is possible to deploy a vCenter with a custom port for its reverse proxy, it is not officially supported.
However, if all you're trying to do is accessing it via a proxy you can easily work around the limitation by adding the port to your configuration like so

provider "vsphere" {
  user                 = "irrelevant"
  password             = "irrelevant"
  vsphere_server       = "10.11.12.13:12345"
  allow_unverified_ssl = true
}

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Type: Bug needs-triage Status: Issue Needs Triage
Projects
None yet
Development

No branches or pull requests

3 participants