
Before understanding the problem, you need to understand the landscape.
Think of managing cloud infrastructure like managing a building. You have several ways to make changes:
Traditional Tools:
┌─────────────────────────────────────────┐
│ Cloud Console → Visual web interface │
│ CLI → Command-line tools │
│ SDKs → Code libraries │
└─────────────────────────────────────────┘
Each of these tools:
Imagine 5 engineers each making changes to cloud resources using different tools. Nobody has a single source of truth about what the infrastructure actually looks like.
IaC frameworks like Terraform solve the chaos of traditional tools by encoding your entire infrastructure in configuration files.
Traditional Approach: IaC Approach:
"Click here, type there" → "Write it down first"
Engineer → Console → Cloud Engineer → Config File → IaC Tool → Cloud
# Terraform configuration (source of truth)
resource "aws_instance" "web_server" {
instance_type = "t2.micro"
ami = "ami-12345"
}
This file IS your infrastructure. The IaC tool reads it and makes the cloud match it.
IaC Configuration File
↓
IaC Framework
↓
Cloud Resources
Rule: Cloud must ALWAYS match the config file
| Feature | Traditional Tools | IaC |
|---|---|---|
| Version control | ❌ | ✅ |
| Reproducibility | ❌ | ✅ |
| Audit trail | ❌ | ✅ |
| Automation | ❌ | ✅ |
| Single source of truth | ❌ | ✅ |
Drift occurs when the actual cloud state no longer matches the IaC configuration.
Timeline of Drift:
Day 1: IaC Config ←→ Cloud State ✅ (In sync)
Day 2: Engineer uses Console to change cloud directly
Day 3: IaC Config ≠ Cloud State ❌ (Drift!)
IaC Config says: Actual Cloud has:
┌──────────────────┐ ┌──────────────────┐
│ Server: t2.micro │ ≠ │ Server: t2.large │
│ Region: us-east │ │ Region: us-east │
│ Port: 80 │ │ Port: 80, 443 │
└──────────────────┘ └──────────────────┘
↑ ↑
What IaC thinks What actually exists
When IaC runs again after drift:
Step 1: IaC reads its config file
Step 2: IaC compares config to cloud
Step 3: IaC sees "differences" (the intentional changes)
Step 4: IaC REVERTS those changes to match old config
Step 5: 💥 Misconfigurations or failures
Real-world analogy: Imagine editing a Google Doc offline, then someone overwrites your changes with the old version because they didn't know you made updates.
All cloud management tools eventually call the same thing:
Console ──────┐
CLI ──────→│ Cloud APIs → Cloud Resources
SDK ──────┘
IaC ──────┘
The cloud doesn't know WHO made the change
Challenge 1: Noisy API Traces
One simple action (e.g., "resize server") might generate:
- 50+ API calls
- Many redundant/irrelevant calls
- Hard to identify the "intent" from raw calls
Challenge 2: Cannot Test in Live Environment
Cloud infrastructure is critical
You cannot just "try" a fix and see if it breaks production
Challenge 3: Mapping Low-Level to High-Level
API Call: "ModifyInstanceAttribute(instanceId=i-123, instanceType=t2.large)"
Intent: "Engineer upgraded server for better performance"
IaC Update: Change instance_type = "t2.micro" → "t2.large"
Key Observation:
ALL cloud changes (Console, CLI, SDK, IaC)
eventually happen through Cloud API calls
Therefore:
Monitor API calls → Detect non-IaC changes → Update IaC config
Step 1: DETECT
┌─────────────────────────────────────┐
│ Monitor cloud API traces │
│ Identify calls NOT made by IaC │
│ These represent "drift events" │
└─────────────────────────────────────┘
↓
Step 2: UNDERSTAND
┌─────────────────────────────────────┐
│ Use LLMs to interpret API sequences │
│ Infer HIGH-LEVEL intent │
│ "What was the engineer trying to do?"│
└─────────────────────────────────────┘
↓
Step 3: RECONCILE
┌─────────────────────────────────────┐
│ Synthesize targeted IaC updates │
│ Use domain-specific context │
│ Update the IaC config file │
└─────────────────────────────────────┘
NSync uses AI agents — autonomous systems that can reason and use tools.
NSync Agent Architecture:
┌─────────────────────────────────────────────┐
│ NSync Agent │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ LLM │ │ Custom │ │Knowledge │ │
│ │ Reasoning│ │ Tools │ │ Base │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ ↑ ↑ ↑ │
│ Understands Interacts Learns from │
│ API intent with IaC/Cloud past runs │
└─────────────────────────────────────────────┘
Run 1: NSync reconciles "server resize" drift
→ Stores: how it solved it, what worked
Run 2: Similar "server resize" drift occurs
→ NSync reuses prior insights
→ Faster, more accurate reconciliation
Run N: NSync becomes increasingly effective
Engineer uses Console to change cloud resource
↓
Cloud API calls are made (logged)
↓
NSync detects non-IaC API calls (drift detected)
↓
LLM analyzes API sequence → infers intent
↓
Agent uses tools + knowledge base
↓
IaC configuration is updated
↓
IaC config now matches actual cloud state ✅
↓
Next IaC run will NOT revert the changes ✅
| Concept | Definition | Why It Matters |
|---|---|---|
| IaC | Infrastructure defined in config files | Single source of truth |
| Drift | Cloud state ≠ IaC config | Causes misconfigurations |
| Out-of-band changes | Changes made outside IaC | Root cause of drift |
| API traces | Log of all cloud API calls | NSync's detection mechanism |
| Reconciliation | Updating IaC to match reality | NSync's core goal |
| AI Agent | Autonomous reasoning system | Handles complexity of reconciliation |
| Knowledge base | Memory of past solutions | Improves over time |
NSync solves a fundamental tension in cloud management: Teams want the flexibility of using multiple tools (Console, CLI, SDK) but also need the reliability of IaC. NSync bridges this gap by automatically detecting when non-IaC changes occur and intelligently updating the IaC configuration — using AI to understand intent from low-level API data.