pier_
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

ArgumentRequiredDescription
<file>noPath to pier.yaml (default: auto-detect)

Flags

FlagValueDefaultDescription
--dry-runPreview changes without applying
-y, --yesSkip confirmation prompt
--pruneDelete resources not in pier.yaml
--all-envsApply all environments (default: current env only)
--purgeDeletes in this apply skip the 30-day recovery window (torn down immediately)
--renameKIND.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 declares

Behaviour

  • apply creates, changes and removes declarations. It never builds and never rolls a running target; pier deploy does that and implies apply.
  • Removals keep data for 30 days in trash; --purge skips the window.
  • Renaming a resource is delete + create unless --rename KIND.OLD=NEW says otherwise.

See also

pier deploy · pier config · Concepts: apply, deploy, staged

On this page