Repository navigation
DriftMgr v1.0.0 - Production Ready
DriftMgr v1.0.0 - Initial Release
🎉 Introduction
DriftMgr is an enterprise-grade infrastructure drift detection and remediation tool designed to help organizations maintain consistency between their Infrastructure as Code (IaC) definitions and actual cloud resources.
✨ Key Features
Multi-Cloud Support
- AWS: Full support for EC2, VPC, S3, IAM, RDS, Lambda, and more
- Azure: Comprehensive coverage of Resource Groups, VMs, Storage, Networks
- Google Cloud Platform: Support for Compute, Storage, Networking resources
- DigitalOcean: Droplets, Volumes, Load Balancers, and Kubernetes
Core Capabilities
🔍 Drift Detection
- Real-time comparison between Terraform state and actual cloud resources
- Intelligent diff algorithms to identify configuration changes
- Support for Terraform state versions 0.11.x through 1.x
- Parallel resource discovery for optimal performance
🔧 Automated Remediation
- Generate Terraform import commands for unmanaged resources
- Create remediation plans with approval workflows
- Support for both cloud-as-truth and code-as-truth strategies
- Safe rollback capabilities with automatic state backups
📊 State Management
- Remote backend support (S3, Azure Storage, GCS, Terraform Cloud)
- State file validation and integrity checking
- Automatic backup before modifications
- State manipulation operations (move, remove, import)
🏗️ Terragrunt Integration
- Full support for Terragrunt configurations
- Dependency resolution and graph analysis
- Run-all command support for multi-module operations
- Remote state handling
Operational Features
🖥️ Multiple Operation Modes
- CLI Mode: Direct command-line interface for all operations
- Server Mode: RESTful API for integration with CI/CD pipelines
- Dashboard Mode: Web-based UI for visualization and management
- Batch Mode: Process multiple state files and environments
📈 Monitoring & Compliance
- Continuous drift monitoring with configurable intervals
- Policy enforcement via Open Policy Agent (OPA)
- Compliance reporting (SOC2, HIPAA, PCI-DSS templates)
- Webhook notifications for drift events
🔒 Security & Safety
- Encryption for sensitive data at rest and in transit
- Audit logging for all operations
- Role-based access control (RBAC) in server mode
- Dry-run mode for all destructive operations
📋 Requirements
- Go 1.23 or later (for building from source)
- Cloud provider credentials (AWS, Azure, GCP, or DigitalOcean)
- Terraform state files (local or remote)
🚀 Quick Start
Installation
Binary Download
Download the latest binary for your platform from the releases page.
Docker
```bash
docker pull catherinevee/driftmgr:latest
docker run --rm -v ~/.aws:/root/.aws catherinevee/driftmgr discover --provider aws
```
Build from Source
```bash
git clone https://github.com/catherinevee/driftmgr.git
cd driftmgr
go build -o driftmgr ./cmd/driftmgr
```
Basic Usage
Discover Resources
```bash
Discover AWS resources in us-east-1
driftmgr discover --provider aws --region us-east-1
Discover all resources across multiple regions
driftmgr discover --provider aws --all-regions
```
Detect Drift
```bash
Detect drift using local state file
driftmgr drift detect --state terraform.tfstate --provider aws
Detect drift from remote backend
driftmgr drift detect --backend s3 --backend-config bucket=my-bucket --backend-config key=terraform.tfstate
```
Generate Remediation
```bash
Generate import commands for unmanaged resources
driftmgr remediate --import --output import-commands.sh
Apply remediation with approval
driftmgr remediate --plan drift-plan.json --apply
```
📦 What's Included
Binaries
driftmgr- Main CLI executabledriftmgr-server- API server for integration
Configuration
- Example configuration files in
configs/ - Terraform state examples in
examples/ - Docker compose files for quick setup
Documentation
- Comprehensive CLI documentation
- API reference for server mode
- Architecture and design documents
- Contributing guidelines
🏗️ Architecture
DriftMgr follows a modular architecture with clear separation of concerns:
- Provider Layer: Cloud-specific implementations for resource discovery
- State Management: Parsing, validation, and manipulation of Terraform state
- Drift Detection Engine: Comparison algorithms and diff generation
- Remediation System: Plan generation and execution
- API Layer: RESTful endpoints and WebSocket support for real-time updates
🧪 Testing
The release includes comprehensive test coverage:
- Unit tests for all core components
- Integration tests with LocalStack and cloud providers
- End-to-end tests for critical workflows
- Performance benchmarks for large-scale operations
📊 Performance
- Handles state files with 10,000+ resources
- Parallel discovery across multiple regions/accounts
- Incremental discovery using Bloom filters
- Efficient caching for repeated operations
🐛 Known Issues
- GitHub Actions runners may experience queueing delays
- Some cloud resources may require additional IAM permissions
- Large state files (>100MB) may require increased memory allocation
🙏 Acknowledgments
Special thanks to all contributors and the open-source community for making this project possible.
📝 License
DriftMgr is released under the MIT License. See LICENSE file for details.
🔗 Links
📈 Future Roadmap
- Kubernetes resource drift detection
- Pulumi state file support
- Cost impact analysis for drift
- Machine learning-based anomaly detection
- Additional cloud provider support (Oracle, IBM Cloud)
Full Changelog: This is the first stable release of DriftMgr.
Checksums
```
SHA256 checksums will be added after build artifacts are generated
```