The Scalr VS Code Extension is a tool designed to streamline your Opentofu/Terraform workflows by integrating Scalr directly into your Visual Studio Code environment. This extension allows you to manage workspaces, monitor runs, and access critical information about your infrastructure—without leaving your code editor.
Please Note: This extension is currently in its early stages of development. While it includes core functionalities, you may encounter bugs or incomplete features. We welcome your feedback and contributions to help improve and stabilize the extension.
Feature | Description |
---|---|
Workspace Management | View a comprehensive list of available workspaces for logged-in users. |
Run Overview | Access a list of all runs, with the ability to filter runs specific to a workspace. |
Run triggering | Preview, Apply, or Destroy infrastructure in the selected workspace and review changes right in the VS Code. |
Detailed Information | Get quick access to general information about any workspace or run. |
Plan/Apply Output | Read the output from Terraform plan and apply operations directly within VS Code. |
Scalr UI Integration | Convenient links provide quick navigation to the corresponding sections of the Scalr web UI. |
If your environment requires using an HTTP proxy to connect to external services, you can configure the VS Code extension to use a proxy by following these steps:
-
Open Settings:
- Go to the Settings tab in VS Code.
- Alternatively, you can open the command palette (
Ctrl+Shift+P
orCmd+Shift+P
on macOS) and search forPreferences: Open Settings (UI)
.
-
Search for Proxy Settings:
- In the Settings search bar, type
proxy
.
- In the Settings search bar, type
-
Configure Proxy:
- HTTP Proxy: Enter your HTTP proxy URL under
Proxy > HTTP: Proxy
. - HTTPS Proxy: If your proxy also handles HTTPS traffic, enter it under
Proxy > HTTPS: Proxy
. - Proxy Strict SSL: Toggle
Proxy > Strict SSL
if your proxy uses a self-signed certificate.
- HTTP Proxy: Enter your HTTP proxy URL under
-
Configure the Extension:
- If the extension needs to use the proxy for specific API calls, ensure it respects the global proxy settings in VS Code. You can also configure proxy settings directly in the extension by setting the following in your
settings.json
:
{ "http.proxy": "http://<proxy-url>:<port>", "http.proxyStrictSSL": false }
- If the extension needs to use the proxy for specific API calls, ensure it respects the global proxy settings in VS Code. You can also configure proxy settings directly in the extension by setting the following in your
-
Restart VS Code:
After configuring your proxy, restart VS Code to ensure the settings are applied.
For more advanced proxy configurations, refer to the official VS Code documentation.
- Open Visual Studio Code.
- Navigate to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window.
- Search for
Scalr
in the search box. - Click Install to install the extension.
If you want to install dependencies and build the extension locally, follow these steps:
ℹ️ Prerequisites:
- Node.js: Ensure you have Node.js installed. You can download it from nodejs.org.
- npm: Make sure you have npm (comes with Node.js).
-
Clone the Repository:
git clone https://github.com/{your-username}/scalr-vscode.git cd scalr-vscode
-
Install Dependencies:
npm install
-
Run the Extension:
- Open the project folder in Visual Studio Code.
- Press
F5
to open a new VS Code window with your extension loaded.
Command | How to? |
---|---|
Login | After installing, you can log in to your Scalr account through the extension. |
View Workspaces | Click on the Scalr icon in the sidebar to view your available workspaces. |
Run Management | Select a workspace to see all associated runs or access the list of all runs. |
Access Details | Click on a workspace or run to view detailed information, including metadata and status. |
Plan/Apply Output | Select a run to view the output from Terraform plan and apply operations. |
UI Links | Use the provided links to navigate quickly to the Scalr UI for deeper management tasks. |
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch-name
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch-name
). - Open a pull request in the scalr-vscode repository.
This project is licensed under the MPL-2.0 License. See the LICENSE file for details.
For any issues or feature requests, please open an issue on our GitHub Issues page.