Facets Architecture
Overview
Facets is a self-serve infrastructure platform that fundamentally transforms how organizations deploy and manage cloud resources. Unlike traditional Infrastructure as Code approaches that require maintaining countless Terraform files across environments, Facets enables users to define their infrastructure once through a blueprint and deploy it consistently across multiple environments.
The Blueprint Approach
In traditional infrastructure management, with n resources across m environments, teams must maintain n×m configuration files. Facets eliminates this complexity through blueprints:
- Blueprint serves as a single source of truth
- Resources are defined as JSON files (like Lego pieces)
- Environment-specific configurations are handled through overrides
- All definitions are stored in version-controlled repositories
What Makes Facets Architecture Unique
The main control plane (root) that powers Facets for all our customers is deployed and managed through Facets itself. The standout feature of our architecture is its modular design. Instead of creating automations for each customer, we use a capability-based approach. This means we build reusable components that make managing infrastructure simpler, consistent, and more efficient.
Understanding the Architecture
While users interact with Facets through a simple UI and JSON-based configurations, a sophisticated internal process ensures that these definitions are translated into functional infrastructure. The following diagram and explanation provide an architectural view of what happens behind the scenes when Facets automates infrastructure provisioning.

Infrastructure Processing Workflow
When users define infrastructure in Facets, the system processes the configuration through the following stages:
1. Configuration Input & Processing
Blueprint Repository:
- Acts as the source of truth, containing JSON definitions for all resources.
- Each JSON file corresponds to a specific infrastructure component with configurations.
Deployment Context:
- Generated by the Facets backend when a provisioning or update request is made.
- Includes metadata such as the target environment, resource changes, and override definitions.
Facets Infra:
- Retrieves the JSON definitions from the Blueprint Repository.
- Merges environment-specific Resource Overrides with the blueprint-level definitions.
At this stage, Facets has a fully resolved infrastructure definition that includes both the baseline blueprint and any applied overrides.
2. Core Processing in Facets
Within the Release Pod, two key engines transform the infrastructure definition into executable Terraform configurations:
Facets Core Engine
- Executes a sequence of scripts to prepare the infrastructure:
- JSON Stitching: Aggregates all resource definitions into a single structured object.
- Release Metadata Transmission: Sends provisioning details to the backend for logging and tracking.
- Ensures all environment-specific configurations are accounted for before proceeding.
- and much more...
Templating Engine
- Uses Mustache Templates to transform the structured JSON output into Terraform configurations.
- Integrates predefined Terraform modules from:
- Facets Terraform Modules (e.g., service, Redis, PostgreSQL, Kafka, Kubernetes).
- Custom Terraform Modules provided by users for extended functionality.
- This step generates modular, environment-specific Terraform files that represent the final infrastructure state.
3. Infrastructure Deployment Execution
Once Terraform configurations are generated, Facets automates the deployment using standard infrastructure-as-code principles:
Terraform Plan:
- Creates an execution plan detailing the infrastructure changes.
- Validates the changes before applying them.
Terraform Apply: Executes the plan and provisions the infrastructure.
4. Post-Deployment Processing: Facets provides logging, monitoring, and external integration capabilities to ensure full visibility into the infrastructure lifecycle:
Terraform File Export:
- By default, Terraform execution happens within Facets.
- If explicitly requested, users can export the generated Terraform files for external execution.
Logging & Notifications:
- All Terraform execution logs are sent to the backend, making them available in the Facets UI.
- Alerts and notifications are handled through:
- Direct streaming to the backend.
- Storage in S3 for long-term tracking.
Benefits of Facets Architecture
Facets automates the complex machinery of infrastructure management:
Simplified User Experience
- Users provide only the essential configuration, not detailed Terraform
- Standardised Architecture: Facets modules ensure consistent, best-practice implementations
- Automated Upgrades: Backend handles Kubernetes and module upgrades without user intervention
- Multi-Environment Consistency: Same blueprint works across development, staging, and production
- Reduced Maintenance: No need to manage numerous Terraform files and CI/CD pipelines
In Practice, for DevOps teams, this means:
- Defining infrastructure once rather than per environment
- Focusing on business requirements instead of Terraform syntax
- Standardising infrastructure across teams and projects
- Eliminating configuration drift between environments
- Reducing the risk of deployment failures
Conclusion
Facets abstracts infrastructure complexity, allowing DevOps engineers to focus on defining intent rather than managing execution. By automating JSON-to-Terraform conversion, handling environment-specific overrides, and executing deployments in a controlled manner, Facets enables reliable, scalable, and consistent infrastructure provisioning.
Updated about 14 hours ago