How rohith-racharla/terrasync works
Terrasync is a Terraform drift-detection and human-approved remediation system, with Terraform-managed AWS infrastructure for dev, staging, and prod. Its main workflow discovers environments, plans them in parallel, reports detected drift, then runs a gated remediation and post-check. The repository also documents PR planning, security scanning, and cost estimation. Relationships below are based on README statements; no source excerpts were available to verify implementation details.
Main entry points: dev/main.tf Dev Environment · staging/main.tf Staging Environment · prod/main.tf Prod Environment · drift-detection.yml Parallel Drift Plans
Components 26
Drift Operations
- Environment Discovery
.github/workflows/drift-detection.yml - Parallel Drift Plans
.github/workflows/drift-detection.yml - Drift Notifications
.github/workflows/drift-detection.yml - Human Approval
.github/workflows/drift-remediation.yaml - Safety Gate
.github/workflows/drift-remediation.yaml - Preflight Plan
.github/workflows/drift-remediation.yaml - Apply or Refresh
.github/workflows/drift-remediation.yaml - Post-Remediation Check
.github/workflows/drift-remediation.yaml - Audit and Issue Closure
.github/workflows/drift-remediation.yaml
Pull Request Checks
- Selective PR Plans
.github/workflows/terraform-pr-check.yml - Security Scanning
.github/workflows/terraform-pr-check.yml - Cost Estimation
.github/workflows/terraform-pr-check.yml
Terraform Infrastructure
- State and OIDC Bootstrap
terraform/bootstrap/main.tf - Dev Environment
terraform/environments/dev/main.tf - Staging Environment
terraform/environments/staging/main.tf - Prod Environment
terraform/environments/prod/main.tf - EKS Module
terraform/modules/eks/main.tf - VPC Module
terraform/modules/vpc/main.tf - IAM Module
terraform/modules/iam/main.tf - ECR Module
terraform/modules/ecr/main.tf
External Services
- AWS
- S3 State and Locking
- GitHub
- Slack
Other components
- Schedule or Dispatch
- Pull Request
Connections 42
- Schedule or Dispatch → Environment Discovery: triggers
README.md - Environment Discovery → Parallel Drift Plans: selects environments
README.md - Parallel Drift Plans → Dev Environment: plans
README.md - Parallel Drift Plans → Staging Environment: plans
README.md - Parallel Drift Plans → Prod Environment: plans
README.md - Parallel Drift Plans → Drift Notifications: reports drift
README.md - Drift Notifications → GitHub: opens issue
README.md - Drift Notifications → Slack: sends message
README.md - GitHub → Human Approval: initiates remediation
README.md - Human Approval → Safety Gate: requires confirmation
README.md - Safety Gate → Preflight Plan: permits run
README.md - Preflight Plan → Apply or Refresh: gates action
README.md - Apply or Refresh → Post-Remediation Check: reruns drift check
README.md - Post-Remediation Check → Audit and Issue Closure: records result
README.md - Audit and Issue Closure → GitHub: closes issue
README.md - Pull Request → Selective PR Plans: triggers
README.md - Selective PR Plans → Dev Environment: plans changed environments
README.md - Selective PR Plans → Staging Environment: plans changed environments
README.md - Selective PR Plans → Prod Environment: plans changed environments
README.md - Selective PR Plans → Security Scanning: runs scans
README.md - Security Scanning → Pull Request: posts results
README.md - Selective PR Plans → Cost Estimation: estimates costs
README.md - Cost Estimation → Pull Request: posts estimates
README.md - Dev Environment → EKS Module: deploys
README.md - Dev Environment → VPC Module: deploys
README.md - Dev Environment → IAM Module: deploys
README.md - Dev Environment → ECR Module: deploys
README.md - Staging Environment → EKS Module: deploys
README.md - Staging Environment → VPC Module: deploys
README.md - Staging Environment → IAM Module: deploys
README.md - Staging Environment → ECR Module: deploys
README.md - Prod Environment → EKS Module: deploys
README.md - Prod Environment → VPC Module: deploys
README.md - Prod Environment → IAM Module: deploys
README.md - Prod Environment → ECR Module: deploys
README.md - State and OIDC Bootstrap → S3 State and Locking: creates remote state
README.md - State and OIDC Bootstrap → AWS: configures OIDC
README.md - Parallel Drift Plans → AWS: uses federated identity
README.md - Apply or Refresh → AWS: uses federated identity
README.md - Dev Environment → S3 State and Locking: stores state
README.md - Staging Environment → S3 State and Locking: stores state
README.md - Prod Environment → S3 State and Locking: stores state
README.md