Reference
pier apply
Converge pier.yaml: add, set and remove resources — never rolls a workload
pier apply [<file>] [flags]Converge pier.yaml: add, set and remove resources — never rolls a workload.
Arguments
| Argument | Required | Description |
|---|---|---|
<file> | no | Path to pier.yaml (default: auto-detect) |
Flags
| Flag | Value | Default | Description |
|---|---|---|---|
--dry-run | Preview changes without applying | ||
-y, --yes | Skip confirmation prompt | ||
--prune | Delete resources not in pier.yaml | ||
--all-envs | Apply all environments (default: current env only) | ||
--purge | Deletes in this apply skip the 30-day recovery window (torn down immediately) | ||
--rename | KIND.OLD=NEW,... | Apply a rename in place instead of delete+create (KIND.OLD=NEW, e.g. apps.api=gateway). Repeatable. |
Global flags apply to every command.
Examples
pier apply # converge the current environment to pier.yaml
pier apply --dry-run # print the plan, change nothing
pier apply --all-envs -y # every environment in the file
pier apply --prune # also remove what pier.yaml no longer declaresBehaviour
applycreates, changes and removes declarations. It never builds and never rolls a running target;pier deploydoes that and impliesapply.- Removals keep data for 30 days in trash;
--purgeskips the window. - Renaming a resource is delete + create unless
--rename KIND.OLD=NEWsays otherwise.