Azure / Azure/vscode-azureterraform

No support for HTTP_PROXY / HTTPS_PROXY when running terraform commands via Cloud Shell or local CLI in corp proxy environments

Open
#352 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rich Text Format
Stars
40
Forks
40
Avg merge
9d 1h
Merged PRs (30d)
2

Description

## Environment

- VS Code: 1.90+
- Extension: Azure Terraform (ms-azuretools.vscode-azureterraform) latest
- OS: Windows 11 Enterprise
- Network: corporate proxy required for outbound HTTPS

## Description

The Azure Terraform extension spawns `terraform` CLI processes and opens Cloud Shell sessions. In corporate environments where outbound HTTPS traffic requires a proxy (configured via `HTTP_PROXY` / `HTTPS_PROXY`), neither path works reliably:

1. **Local terraform runs** — the extension spawns the `terraform` process but does not explicitly forward proxy environment variables from the VS Code process environment. Whether the child process inherits them depends on how VS Code itself was launched, which varies between terminal and GUI start.

2. **Cloud Shell** — the integrated Cloud Shell terminal does not document whether proxy settings are applied or how to configure them. In corp environments where Cloud Shell itself is blocked by the firewall, there is no guidance on configuring a proxy for the WebSocket connection.

There is no documentation in the README or extension settings on proxy configuration.

## Expected Behaviour

- README documents proxy support: which env vars are forwarded to terraform processes, and whether `HTTP_PROXY` is set in the Cloud Shell environment.
- Extension settings include an option to explicitly set `HTTP_PROXY` / `HTTPS_PROXY` for spawned terraform processes, overriding or supplementing the inherited environment.
- Clear error message when a Cloud Shell connection fails due to proxy/firewall, with a link to configuration steps.

## Actual Behaviour

Terraform provider downloads (`terraform init`) and state backend calls fail silently or with generic network errors. No documentation addresses corp proxy setup.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the README, extension settings, and the code paths that spawn local terraform processes or open Cloud Shell sessions. Check how environment variables are inherited and how Cloud Shell connection failures are reported. Done means proxy configuration is documented, explicit terraform proxy settings are supported, and proxy or firewall failures provide actionable guidance.

Written by the indexing model from the issue text.

Assessment

Domain
cli, cloud, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.