A Visual Studio Code extension that allows you to quickly switch between Google Cloud Platform (GCP) projects directly from the status bar. This is ideal for developers and administrators who work with multiple GCP projects and need an efficient way to change their active gcloud configuration.
Features
Status Bar Integration: Displays the currently active GCP project in the VS Code status bar.
Quick Project Switching: Click the status bar item to open a dropdown list of your configured projects for a quick switch.
Workspace-Specific Configuration: Define your projects in a simple .gcp-projects.json file at the root of your workspace.
Automatic gcloud Updates: Automatically runs gcloud config set project <project-id> when you switch, keeping your terminal and other tools in sync.
Requirements
Before you begin, ensure you have the following installed and configured:
Visual Studio Code (version 1.85.0 or newer)
Google Cloud SDK: The gcloud command-line tool must be installed and authenticated on your system.
How to Use
Install the Extension:
Search for "GCP Enterprise Project Switcher" in the VS Code Extensions view and click Install.
Create Configuration File:
In the root directory of your VS Code workspace, create a file named .gcp-projects.json.
Define Your Projects:
Add your project details to the .gcp-projects.json file using the following format. You can add as many projects as you need.
Switch Projects:
Click the project name in the VS Code status bar (usually at the bottom right). A dropdown list will appear. Select the project you wish to activate. The extension will update your gcloud configuration automatically.
Release Notes
1.0.0
Initial public release.
Added icon and improved documentation for the marketplace.
Feature set includes status bar display and quick switching via a workspace configuration file.