File structure
Root config: ubx.root.yaml
Supported fields
| Field | Type | Description |
|---|---|---|
backend | string | Pulumi state backend URL (e.g. s3://bucket/state, file://.ubx/state) |
default_stack | string | Default stack name when --stack is not set |
stacks | list of strings | Valid stack names for the organisation |
default_tags | map | Resource tags applied to all taggable units (deep-merged with child tags) |
Root providers: ubx.root.iac
Declare provider version constraints that apply to all child projects:
ubx.root.iac supports provider blocks only. The provider constraints are merged into the child’s package.json at compile time — you don’t need a provider block in every child project.
Child project: ubx.yaml
A child project only needs to declare what differs from the root:
Tag merge example
Rootubx.root.yaml:
ubx.yaml:
Child providers: extend and override
A child project can declare its ownprovider block to use a different version than the root:
Merge rules
| Field | Rule |
|---|---|
backend | Child wins if declared; otherwise inherit root |
default_stack | Child wins if declared; otherwise inherit root |
stacks | Child wins if declared (even partial list); otherwise inherit root |
default_tags | Deep merge — root provides base; child overwrites on key conflict |
| Provider blocks | Union — root provides baseline; same-name child block wins entirely |
ubx.root.iac absent | Treated as no root providers — not an error |
Root discovery
When you run any ubx command from a child directory, ubx automatically walks up the directory tree looking forubx.root.yaml:
ubx.root.yaml found, or at a .git directory (single-project mode — no root applied, no error).
--root flag
Override discovery with an explicit root directory:
--root flag is available on validate, plan, apply, and destroy.
Root line in output
When a root config is active, ubx shows it before the compile phase:Scaffold with ubx init --hierarchy
The --hierarchy flag creates the full root + child structure in one step:
Running Commands Across All Projects
The--all flag runs validate, plan, or apply across every child project discovered under the root, in a single command.
Basic usage
ubx.root.yaml and then discovers all child projects beneath it.
Output format
--filter — run a subset of projects
filepath.Match glob semantics are applied.
--parallel — concurrent execution
1 (sequential). Output is printed in project order regardless of completion order.
--continue-on-error — collect all results
--continue-on-error, --all stops on the first failure and marks remaining projects as skipped:
--continue-on-error, every project runs regardless of failures. The summary shows final counts:
Error: no root found
Ifubx.root.yaml is not found in any parent directory, --all exits immediately:
--root flag to point to an explicit root when outside the discovery path:
--all flag reference
| Flag | Default | Description |
|---|---|---|
--all | false | Run across all child projects under the root |
--filter string | (all) | Exact path or glob pattern to restrict which projects run |
--parallel int | 1 | Number of projects to run concurrently |
--continue-on-error | false | Keep running even after a failure (default stops on first) |
Complete example
ubx.root.yaml (monorepo root):
ubx.root.iac (monorepo root):
services/api/ubx.yaml (child project):
services/api/main.iac (child project):
services/api/:
services/api/:
- Backend:
s3://my-org-state/state(from root) - Stacks:
[dev, staging, prod](from root) - Tags:
{managed: ubx, team: platform, service: api, env: "${input.env}"}(merged) - AWS provider:
~> 6.0(from root — no override in child)

