Publish with bricks.yaml

Publish blueprints using bricks.yaml format for simplified syntax, multi-document support, and YAML-native features.

Why bricks.yaml?

bricks.yaml provides a slimmer, more maintainable alternative to bricks.json:

  • Simplified syntax - Only specify what you need to change

  • Auto-populated fields - Props and outputs inherited from packages

  • Multi-document support - Publish multiple blueprints from one file

  • YAML features - Anchors, aliases, and merge keys for reusable configuration

  • Higher priority - When both files exist, YAML takes precedence

Example comparison:

Original bricks.json: 346 lines Equivalent bricks.yaml: 30 lines

Basic Format

Minimal Blueprint

name: web_application
version: 1.0.0
packages:
  - name: terraform_aws_vpc
    version: 3.0.0

Required fields:

  • name - Blueprint name

  • version - Blueprint version (semver)

  • packages - Non-empty list of packages (at least one)

Note: All field names are lowercase: name, version, packages, inputs, outputs, props

Complete Blueprint

Package Configuration

Auto-Populated Props

You only need to specify props you want to change or override. All other props from the package definition are automatically included.

When to specify props:

  • Override default values

  • Connect to other packages via data references

  • Use blueprint inputs

  • Set hardcoded values

Explicit Package IDs

Specify the id field when:

  • Using the same package multiple times

  • Referencing package outputs in other packages

  • Ensuring predictable output references

Without explicit IDs, the CLI generates IDs automatically, making it harder to predict output references.

Auto-Populated Outputs

Package outputs are automatically included. You only need to specify outputs in the blueprint if you want to:

  • Override output values

  • Add conditional outputs

  • Change output names

  • Add additional outputs not in the package

If you don't need to modify outputs, omit the outputs section entirely.

Value References

Data References

Reference outputs from other packages using data.<package_id>.<output_key>:

Important: Use lowercase data, not Data.

For detailed information on how data references create dependencies and DAG execution order, see How to Create Blueprints.

Input References

Reference blueprint inputs using inputs.<input_key>:

Important: Use lowercase inputs, not Inputs.

String Values

How values are interpreted:

Simple references (no quotes needed):

Strings with special characters (use quotes):

Detection order:

  1. inputs.* pattern → Input reference

  2. data.* pattern → Data reference

  3. Expression matching → Expression

  4. Fallback → String literal

YAML Features

Anchors and Aliases

Define configuration once with anchors (&name) and reuse with aliases (*name):

Merge Keys

Combine multiple configurations with merge keys (<<):

Anchors with Package Repetition

Use anchors when repeating the same package:

Note: When overriding props with anchors, you replace the entire props object. To merge props, use nested anchors:

Input Configuration

Input Types

Define blueprint inputs with types, defaults, and constraints:

Without default: Input is required at deployment time

With default: Input is optional, uses default if not provided

Allowed Values

Restrict input values to specific options:

Multi-Document YAML

Publish multiple blueprints from a single file using document separators (---):

Each document is published as a separate blueprint.

Publishing

Publish your blueprint using the standard command:

File Priority:

When both bricks.yaml and bricks.json exist, YAML takes precedence:

For more details on publishing workflows, see How to Create Blueprints.

Multi-Document Publishing

Validation During Publish

The CLI validates your YAML during publish:

Missing version:

Invalid package version:

Invalid output reference:

Malformed YAML:

Development Workflow

Finding Packages

Search for packages to add to your blueprint:

Inspecting Package Details

Get package information before adding to your blueprint:

Example output:

Viewing Props and Outputs

Check available props and outputs for a specific version:

Building Your YAML

Use the information from bricks bp get to construct your blueprint:

Step 1: Search and identify packages

Step 2: Get package details

Step 3: Create bricks.yaml

Step 4: Verify references

Iterative Development

Build your blueprint incrementally:

Viewing Generated Blueprint

After publishing, view the full hydrated blueprint:

This shows:

  • All props - Including defaults from packages

  • All outputs - Including auto-populated outputs

  • Generated IDs - For packages without explicit IDs

  • Full resolution - How inputs and data references resolve

Example comparison:

Your bricks.yaml (30 lines):

Generated bricks.json (346 lines):

Migration from bricks.json

Lazy Migration Approach

You don't need to migrate all blueprints at once:

  1. Keep existing bricks.json files working

  2. Create new blueprints with bricks.yaml

  3. Migrate gradually as you update blueprints

Converting Existing Blueprints

Manual conversion:

  1. Create new bricks.yaml file

  2. Copy name, version, description, tags

  3. Define inputs from props

  4. List packages (only override props as needed)

  5. Add outputs only if customizing

  6. Test with bricks blueprint publish

Keep reference:

What Gets Converted

bricks.yaml is converted to bricks.json server-side:

All package props and outputs are hydrated automatically.

See also

YAML-Specific Best Practices

Use Anchors for Repeated Configuration

Extract common settings to avoid repetition:

Multi-Document for Environments

Use document separators for environment-specific blueprints:

Props Merging with Anchors

Use nested anchors to merge props properly:

Only Specify What Changes

Minimize YAML by relying on auto-populated props:

Last updated

Was this helpful?