This VS Code extension simplifies connecting to Google Cloud Platform (GCP) instances through Identity-Aware Proxy (IAP) tunneling. It integrates with VS Code's Remote SSH functionality to make connecting to your GCP instances seamless.
Requirements
Visual Studio Code 1.60.0 or higher
Google Cloud SDK (gcloud) installed and authenticated (gcloud auth login)
Appropriate IAP permissions configured in your GCP project
Usage
Install the extension from the VS Code marketplace
Open the command palette (Ctrl/Cmd + Shift + P)
Search for "GCP IAP: Configure Instance"
Follow the prompts to select your:
GCP Project
Instance
Zone
Submit. The extension will add the host config to your SSH config file.
Configuration
The extension supports the following settings:
gcpIapSsh.sshConfigPath: Custom path to SSH config file. If not set, the extension will:
Use VS Code's remote.SSH.configFile setting if available
Fall back to the default ~/.ssh/config
gcpIapSsh.defaultProject: Default GCP project ID to use
You can modify these settings in VS Code's settings.json: