Documentation
Learn how to use TerraGuard to secure your Terraform infrastructure with comprehensive security analysis, compliance reporting, and guardrail enforcement.
Getting Started
Core Concepts
Introduction
TerraGuard is a security analysis tool for Terraform infrastructure. It analyzes your Terraform plan files and detects security risks, compliance violations, and configuration issues before you deploy.
Built in Rust for high performance, TerraGuard can process large Terraform plans with hundreds of resources using streaming JSON parsing. It supports multiple cloud providers including AWS, Azure, and Cloudflare.
Installation
terminal
# Install via cargo
$ cargo install terraguard
# Or download the binary
$ curl -sSL https://syncrally.com/install.sh | sh
Quick Start
Follow these steps to analyze your first Terraform plan:
Step 1: Generate a Terraform plan JSON
$ terraform plan -out=plan.binary
$ terraform show -json plan.binary > tfplan.json
Step 2: Run TerraGuard analysis
$ terraguard tfplan.json --format html
✓ Analysis complete
Report saved to: report.html
CLI Commands
| Command | Description |
|---|---|
| terraguard <file> | Analyze a Terraform plan JSON file |
| --format <type> | Output format: text, markdown, html, json, csv, detailed |
| --compliance-report <type> | Generate compliance report: soc2, pci-dss |
| --fail-on-guardrail | Exit with error code on guardrail violations |