Infrastructure Management Guide
Overview
Infrastructure Architecture
Repository Structure
infra-core/
└── stacks/
└── ml-databricks/
├── main.tf # Primary infrastructure definitions
├── providers.tf # Terraform and Databricks providers
├── variables.tf # Input variables
├── outputs.tf # Output values
├── schemas.tf # Unity Catalog schema definitions
├── backend.tf # Remote state configuration
└── .terraform/ # Terraform working directoryInfrastructure Components
Terraform State Management
Remote State Backend
State Operations
State Locking
Workspace Management
Listing Workspaces
Workspace Details
Adding New Workspace
Service Principal Management
Listing Service Principals
Service Principal Permissions
Service Principal OIDC Configuration
Unity Catalog Management
Catalog Structure
Adding New Schema
External Locations for Volumes
Drift Detection
What is Drift?
Detecting Drift
Handling Drift
Automated Drift Detection
Infrastructure Changes Workflow
Standard Change Process
Emergency Changes
Terraform Troubleshooting
Issue 1: State Lock Error
Issue 2: Provider Authentication Error
Issue 3: Resource Already Exists
Issue 4: Workspace Not Found
State Recovery Procedures
Scenario 1: State File Corrupted
Scenario 2: State Out of Sync
Scenario 3: Lost State File
Best Practices
1. Always Run Plan Before Apply
2. Use Targeted Operations Carefully
3. Keep State Secure
4. Document All Changes
5. Test in Dev First
6. Regular State Backups
Useful Commands Reference
Terraform Commands
Databricks CLI Commands
AWS CLI Commands
Related Documentation
Infrastructure Contacts
Last updated