← ClaudeAtlas

drift-detectorlisted

Detect infrastructure drift between Terraform state and actual cloud resources. Identifies unmanaged resources, manual changes, and configuration drift. Use when: - User asks to check for infrastructure drift - User wants to find unmanaged cloud resources - User mentions "drift detection" or "Terraform drift" - User asks to compare cloud state to IaC - User wants to audit infrastructure changes
snyk/studio-recipes · ★ 71 · DevOps & Infrastructure · score 89
Install: claude install-skill snyk/studio-recipes
# Infrastructure Drift Detector Detect, track, and resolve infrastructure drift between Terraform state and actual cloud resources to maintain Infrastructure as Code integrity. **Core Principle**: Your cloud should match your code. **Note**: This skill uses `snyk iac describe` CLI command (requires shell execution). --- ## Quick Start ```bash # Basic drift scan against a local Terraform state file snyk iac describe --from=tfstate://terraform.tfstate # Output as JSON for further analysis snyk iac describe --from=tfstate://terraform.tfstate --json > drift-report.json ``` --- ## Prerequisites - Terraform project with state file (local or remote) - Cloud provider credentials configured - `snyk` CLI installed - Network access to cloud APIs ### Supported Cloud Providers | Provider | Setup | |----------|-------| | **AWS** | AWS credentials (profile, env vars, or IAM role) | | **Azure** | Azure CLI login or service principal | | **GCP** | Application default credentials or service account | For a full list of supported resource types per provider, see `SERVICES.md`. --- ## Phase 1: Setup **Goal**: Configure drift detection environment. ### Step 1.1: Verify Terraform State Check for Terraform state: **Local state**: ```bash ls terraform.tfstate ``` **Remote state** (S3 backend): ```hcl terraform { backend "s3" { bucket = "my-terraform-state" key = "state/terraform.tfstate" region = "us-east-1" } } ``` ### Step 1.2: Verify Cloud Credentials **AW