Feature/local dry run from working directory#67
Merged
emocharnik merged 9 commits intomainfrom Apr 9, 2026
Merged
Conversation
Adds a new command 'Scalr: Dry Run from Working Directory' that lets developers trigger a plan-only run directly from their local checkout without needing to run `terraform init` first (which requires state-versions:read permission). Workflow: - Reads the git remote URL and repo root from the VS Code git API - Computes the relative working-directory path within the repo - Fetches Scalr workspaces filtered by VCS repo identifier and working-directory, auto-selecting if exactly one matches or prompting the user otherwise (caching the choice per directory) - Archives the git repo root as a tar.gz and uploads it as a dry configuration version via the Scalr API - Creates an is-dry run referencing that configuration version - Opens the plan log for live monitoring Also extends git.d.ts with fetchUrl/pushUrl on Remote, adds getGitRepoInfo() to git.ts, and adds Node.js built-in fallbacks to the web webpack bundle so it builds cleanly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds the 'Dry Run from Working Directory' button to the editor title bar whenever a Terraform or OpenTofu file is the active editor, making the command easily discoverable without opening the command palette. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…g logging - Switch configuration version creation to /api/tfe/v2 to get upload-url for VCS-backed workspaces (with temporary go-tfe User-Agent workaround until backend fix lands) - Derive working directory from the active editor file path instead of the VS Code workspace folder root, so nested module directories resolve correctly - Exclude .git and .terraform directories from the uploaded archive - Add Output channel logging throughout: workspace matching candidates, CV creation response, upload HTTP status, and per-poll CV status - Improve error message to always show the working directory Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Replace $(rocket) with $(play) on the editor title bar button - Add a CodeLens "▶ Scalr: Dry Run" at the top of every .tf/.tofu file so the action is visible directly next to the code without opening the command palette or the Scalr sidebar Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
CodeLens only appears at the top of the file and disappears when scrolled down, making it unreliable. The editor title bar button (always visible) is sufficient. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Before triggering a run the user is now offered a choice: - "Current repository" — existing VCS + working-dir matching flow - "Other workspace…" — for CLI-driven or non-VCS workspaces The "Other" path lets the user filter by environment (shows an environment quick-pick, then lists workspaces in that env) or by workspace name/ID (text input → matching workspaces), and finishes with a workspace quick-pick before proceeding to upload and run. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…al-dry-run-from-working-directory
…ovements - Add approve/discard actions on plan sub-items for runs awaiting confirmation - Add cancel button on in-progress run items - Show bell icon on run and workspace items when approval is needed - Open apply log automatically after approving a run - Click plan/apply sub-items to view logs directly (no separate button) - Remove standalone 'Show Plan/Apply Output' inline buttons - Auto-refresh workspaces and runs views every 5 seconds - Trigger immediate refresh when a plan/apply step finishes - Fix refresh button losing active workspace filter (softRefresh pattern) - Replace tfe/v2 + go-tfe User-Agent hack with standard SDK createConfigurationVersion - Replace shell-pipe archiving with execFile git ls-files + tar --files-from to respect .gitignore, support .terraformignore, and work correctly on Windows - Update CHANGELOG for v0.2.0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.