A VS Code extension for automated Terraform security analysis and root cause analysis (RCA) workflow integration with the Cielara platform.
First Time Setup Instructions
Open the terraline-issue folder as a project in VSCode
npm install
npm run compile
Open the ./src/extension.ts file, and From VSCode Menu, select Run --> Start Debugging
New Window with title Extension Development Host (call it Host Editor) will open up, in that window, browse to the terraform project.
PreReqs to run before 5.1:
On the core repo, run the backend using make docker-rebuild or the make docker-dbs + make docker-hot-reload
Perform the scan cmd on the core
On the insights-agent repo, build and run the container:
build: docker build -t insights-agent .
run: docker run --rm -p 8088:8088 --name insights-agent --env-file .env insights-agent:latest
5.1. In the terraform project, open and keep the main.tf file in the Host editor, and Open Command Palette, and Run the Cielara PreRCA cmd.
Features
Automated File Upload: Automatically discovers and uploads .tf and .env files from your workspace
Terraform Workflow Automation: Executes terraform init, validate, and plan operations
Impact Simulation: Generates base64-encoded terraform plans and submits them to the SAIMON API for impact analysis
Integrated Authentication: Handles IAM authentication and JWT token management
Real-time Feedback: Displays progress and results in VS Code notifications
Commands
Cielara Pre RCA: Executes the complete pre-RCA workflow including file upload, terraform operations, and impact simulation
Requirements
Terraform CLI installed and available in PATH
PowerShell (Windows)
Access to the Cielara API endpoints
Valid authentication credentials configured in the extension
Usage
Open a workspace containing Terraform files (.tf)
Open the Command Palette (Ctrl+Shift+P)
Run the command: "Cielara Pre RCA"
The extension will automatically upload your terraform files and execute the analysis workflow
Development
Building from Source
Install vsce (VS Code Extension Manager)
npm install -g @vscode/vsce
Install dependencies
npm install
Build the package
vsce package
This will create a .vsix file (e.g., terraline-issue-0.0.1.vsix)