Artifact Lifecycle
Prerequisites
Overview
When to Use Lifecycle Configuration
Use Lifecycle Config When:
Use Environment Variable Detection When:
Lifecycle Configuration
Basic Structure
Lifecycle Phase Fields
Field
Type
Description
Default
Configuration Inheritance
Skipping Stages
Skipping Destroy with Lifecycle Config
Skipping Destroy with Environment Variable
Skipping Plan
Environment Variables
BRICKS_ACTION
BRICKS_STATE
BRICKS_JOB_ID
Usage Examples
Example 1: Different Arguments Per Stage
Example 2: Environment Variable Detection
Example 3: Skipping Destroy
Example 4: Stage-Specific Environment Variables
Stage Execution Flow
Plan Stage
Apply Stage
Destroy Stage
Complete Example: Database Migration
Best Practices
Use Lifecycle Config For:
Use Environment Detection For:
Always Handle BRICKS_ACTION
Write Outputs For All Stages
Use BRICKS_STATE During Destroy
Backward Compatibility
See also
Last updated
Was this helpful?

