Local Development Container

Test and iterate on blueprints locally using the bricks run command before deploying to cloud environments.

What Is Local Blueprint Development?

Local blueprint development enables testing blueprints on your local machine without cloud deployment. Use the bricks run command to execute blueprints locally, validate configuration, and iterate rapidly.

Key Features:

  • Local execution without cloud deployment costs

  • Rapid iteration on blueprint configuration

  • Offline development when cloud access is limited

  • Testing and validation before publishing

  • Local file references for packages and IaC code

How It Works

The bricks run command executes blueprints locally:

bricks run ./my-blueprint
        
Analyze bricks.json configuration
        
Resolve dependencies and Data references
        
Execute packages locally
        
Outputs returned to local directory

Local execution mirrors cloud deployment behavior but runs entirely on your local machine.

Local File References

Local development supports referencing packages and IaC code using local file paths in bricks.json.

Referencing Local Packages

Reference local packages in the packages array using file paths:

Relative paths:

Absolute paths:

Explicit file protocol:

Referencing IaC Code

Within packages, use the executor field to reference local IaC code:

Terraform/OpenTofu:

Helm:

Generic artifact:

Path Resolution

Local paths are resolved relative to the directory containing bricks.json:

  • ./packages/module - Relative to current bricks.json location

  • ../shared/module - Relative to parent directory

  • ~/workspace/module - Relative to home directory

  • /absolute/path/module - Absolute filesystem path

Local Development Workflow

1. Develop Blueprint Locally

Create or modify a blueprint:

2. Run Locally

Execute the blueprint without cloud deployment:

3. Iterate and Test

Review outputs, modify code, and test again:

4. Publish When Ready

Once validated locally, publish to Bluebricks:

Local Run Command

Basic Usage

Arguments:

  • package - Path to blueprint directory or package name

Common Flags

Execution Control:

Configuration:

Advanced:

Local vs Cloud Execution

Local Execution

When to use:

  • Developing new blueprints

  • Testing configuration changes

  • Validating package composition

  • Debugging execution issues

  • Offline development

Limitations:

  • No cloud resource creation

  • Limited cloud provider authentication

  • State management is local

  • No deployment tracking in Bluebricks

Cloud Execution

When to use:

  • Production deployments

  • Environment-specific deployments

  • Team collaboration

  • Persistent state management

  • Cloud resource provisioning

Benefits:

  • Full cloud provider integration

  • Centralized state management

  • Deployment history and tracking

  • Team visibility

Local Development Examples

Example 1: Single Terraform Package

bricks.json:

Test locally:

Example 2: Blueprint with Local Packages

Root bricks.json:

Test locally:

Example 3: Mixing Local and Registry Packages

bricks.json:

Local package (./packages/custom-vpc) and registry package (terraform_aws_s3) work together.

Local State Management

State Location

Local runs store state in output directory:

State Persistence

Local state:

  • Stored in filesystem

  • Not uploaded to Bluebricks

  • Persists across local runs

  • Cleaned manually if needed

Cloud state:

  • Stored in HTTP backend

  • Accessible across deployments

  • Managed by Bluebricks

  • Persistent and versioned

Clear Local State

Testing Best Practices

Development Cycle

  1. Write/Modify Blueprint

    • Edit bricks.json

    • Update package references

    • Modify properties

  2. Plan Locally

    • Review execution plan

    • Check dependency resolution

    • Validate configuration

  3. Apply Locally

    • Execute blueprint

    • Review outputs

    • Check for errors

  4. Iterate

    • Fix issues

    • Adjust configuration

    • Repeat plan/apply

  5. Publish

Property Testing

Test with different property sets:

Configuration Testing

Test different configuration scenarios:

Local Development Limitations

Cloud Resource Creation

Local development does not create actual cloud resources:

  • Terraform/Helm/Bicep plans are generated

  • Generic artifacts execute containers

  • No AWS/GCP/Azure API calls made

  • State is local only

Cloud Authentication

Limited cloud provider authentication:

  • No automatic cloud credential injection

  • Must configure cloud credentials locally

  • Some executors may require manual setup

State Synchronization

Local state is not synced:

  • State stays on local machine

  • Not visible in Bluebricks dashboard

  • Team members cannot see local runs

  • Must publish and deploy to cloud for shared state

Deployment Tracking

Local runs are not tracked:

  • No deployment history

  • No status monitoring in UI

  • No log streaming to Bluebricks

  • Purely local execution

Transitioning to Cloud

From Local to Cloud Deployment

Reusing Local Configuration

Local props files work in cloud:

Best Practices

Local Development

  • Test all changes locally before publishing

  • Use props files for different scenarios

  • Keep local state clean between major changes

  • Run dry-run before apply for complex blueprints

Property Management

  • Create separate props files for each environment

  • Test with production-like properties

  • Validate required properties locally

  • Document property requirements

Iteration Speed

  • Use local runs for rapid iteration

  • Reserve cloud deployments for validation

  • Test edge cases locally first

  • Publish only after local validation

Team Workflow

  • Share props files in version control

  • Document local testing procedures

  • Establish testing checklist before publishing

  • Use cloud deployments for team collaboration

See also

Last updated

Was this helpful?