A visual diff tool for Terraform plan changes with targeted apply support.

Features
- Visual Plan Diff: Run
terraform plan and see all resource changes in a split-pane UI
- Resource List: Left panel shows all resources to be changed with action badges (create/update/delete/replace)
- Diff Viewer: Click any resource to see its attribute-level diff on the right panel
- Targeted Apply: Select specific resources with checkboxes and apply only those changes using
-target
- Live Terminal Output: See real-time
terraform command output in the bottom panel
- CLI Confirmation: Type "yes" to confirm apply, just like the standard Terraform CLI
- Auto-Detection: Automatically finds all Terraform roots in your workspace
Usage
- Open a workspace containing Terraform files (
.tf)
- Open the Command Palette (
Ctrl+Shift+P / Cmd+Shift+P)
- Type "Terraform UI" and select it
- Or right-click a folder/
.tf file in the Explorer and select "Terraform UI"
Workflow
- Select a Terraform root from the dropdown
- Click ▶ Run Plan to execute
terraform plan
- Review resources in the left panel — click any to see detailed diff
- Check the resources you want to apply
- Click Apply Selected at the bottom
- Type
yes in the confirmation prompt and press Enter
Requirements
- Terraform CLI must be installed and available in your
PATH
- Terraform must be initialized (
terraform init) in your project directories
Development
cd experiments/vscode-terraform-ui
npm install
npm run compile
To test: Press F5 in VSCode to launch Extension Development Host.
Release
Prerequisites
vsce CLI (installed as devDependency via @vscode/vsce)
- VS Code Marketplace PAT (Azure DevOps → Marketplace: Manage scope)
- Open VSX token (open-vsx.org → User Settings → Access Tokens)
Manual Release
- Update
CHANGELOG.md — rename [Unreleased] to [X.Y.Z], add fresh [Unreleased] above
- Bump version:
npm version X.Y.Z --no-git-tag-version
- Build and package:
npm run vscode:prepublish
npm run vscode:package
- Publish to VS Code Marketplace:
npx vsce publish
- Publish to Open VSX:
npm run ovsx:publish
- Commit, tag, and push:
git add package.json package-lock.json CHANGELOG.md
git commit -m "Bump X.Y.Z"
git tag -a "vX.Y.Z" -m "Release vX.Y.Z"
git push origin master && git push origin "vX.Y.Z"
GitLab CI Release
The .gitlab-ci.yml pipeline automates publishing:
- Every push:
build job compiles and packages the .vsix
- Manual on default branch:
release:tag creates a git tag from the current package.json version
- On tag push:
publish:vsce and publish:ovsx publish to both marketplaces
- On tag push:
release:notes creates a GitLab release
Required CI/CD variables:
| Variable | Description |
|----------|-------------|
| VSCE_PAT | VS Code Marketplace Personal Access Token |
| OVSX_TOKEN | Open VSX Registry access token |
| CI_REPOSITORY_PUSH_USERNAME | GitLab username with push rights (for tagging) |
| CI_REPOSITORY_PUSH_TOKEN | GitLab token with push rights (for tagging) |
| |