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 configured
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.
Troubleshooting
Ensure you're logged in to gcloud:
gcloud auth login
Verify that you have appropriate permissions: compute.viewer and iap tunnel user at least
Check the extension logs in VS Code's "Output" panel (select "GCP IAP SSH" from the dropdown)
Contributing
Found a bug or have a feature request? Please open an issue on our GitHub repository.
License
MIT
Development
Prerequisites
Node.js and npm installed
VS Code Extension Manager (vsce) installed: npm install -g @vscode/vsce
Testing Locally
Clone the repository:
git clone https://github.com/yourusername/vscode-gcp-iap-ssh-config
cd vscode-gcp-iap-ssh-config
Install dependencies:
npm install
Open the project in VS Code:
code .
Press F5 to start debugging. This will:
Launch a new VS Code Extension Development Host
Load your extension in development mode
Enable you to set breakpoints and debug the extension
Package and Install
To test the extension as if it were installed from the marketplace: