Hooks
Hooks run commands around component lifecycle phases.
hooks: pre_apply: - command: ./prepare.sh post_apply: - command: curl -fsS "${api.outputs.url}/health"Hook phases:
pre_applypost_applypre_destroypost_destroy
Each hook supports:
| Field | Required | Default | Description |
|---|---|---|---|
command | Yes | None | Command string. Values are interpolatable. |
shell | No | ["sh", "-c"] | Shell command prefix used for the hook. |
env | No | {} | Additional hook environment values. Values are interpolatable. |
Hooks require the selected runner to support Exec. See Lifecycle Hooks for behavior details.
See Env for default runtime variables available to hooks.