Key Properties
Each environment has:- Name: Human-readable identifier (e.g., “Production”, “Staging”)
- System: The system this environment belongs to
- Directory: Optional hierarchical path for organization (e.g.,
us-east/production) - Description: Additional information about the environment
- Resource Selector: Filter that determines which resources belong to this environment
- Metadata: Key-value pairs for additional context (e.g., region, tier)
How Environments Work
Environments create a deployment matrix by combining with deployments. For each deployment in a system, Ctrlplane creates release targets for every combination of:- The deployment
- Each environment in the system
- Each resource matching the environment’s resource selector
- 3 deployments (
web-app,api,database) - 2 environments (
staging,production) - 10 resources (5 matching
staging, 5 matchingproduction)
Resource Selectors
Environments use resource selectors to determine which resources they include. Selectors are filter expressions based on resource metadata:- Region-based environments (resources in
us-east-1) - Tier-based environments (resources tagged
tier:production) - Custom groupings based on any resource metadata
Environment Policies
Each environment can have policies attached that control deployment behavior:- Approval Requirements: Require manual approval before deployments
- Deployment Success Criteria: Define what constitutes a successful rollout
- Concurrency Limits: Limit simultaneous deployments
- Rollout Duration: Control gradual rollout speed
- Environment Dependencies: Require successful deployment in other environments first
- Release Windows: Restrict when deployments can occur
Environment Progression
Environments typically form a progression path:Lifecycle Events
When an environment’s resource selector changes, Ctrlplane:- Re-evaluates which resources match the new selector
- Creates release targets for newly matching resources
- Removes release targets for resources that no longer match
- Triggers appropriate deployment jobs based on policies