You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## what
Allow the `after_run` (FINALLY hook) to be set for Spacelift stacks.
## why
For use cases when a script is needed to be ran even if the
apply/deployment doesn't go through. Similar to the try catch, finally.
## references
https://registry.terraform.io/providers/spacelift-io/spacelift/latest/docs/resources/stack#after_run-1

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced an "after_run" hook that lets users define commands to be
executed after a stack run, enhancing lifecycle control and
customization.
- Added support for the new `after_run` variable in the configuration
options.
- **Documentation**
- Updated documentation to include the new `after_run` input variable
and its usage details.
- **Tests**
- Added assertions to validate the `after_run` configuration in test
cases.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -269,6 +269,7 @@ This is to support easy local and outside-spacelift operations. Keeping variable
269
269
| <a name="input_after_init"></a> [after\_init](#input\_after\_init) | List of after-init scripts | `list(string)` | `[]` | no |
270
270
| <a name="input_after_perform"></a> [after\_perform](#input\_after\_perform) | List of after-perform scripts | `list(string)` | `[]` | no |
271
271
| <a name="input_after_plan"></a> [after\_plan](#input\_after\_plan) | List of after-plan scripts | `list(string)` | `[]` | no |
272
+
| <a name="input_after_run"></a> [after\_run](#input\_after\_run) | List of after-run (aka `finally` hook) scripts | `list(string)` | `[]` | no |
272
273
| <a name="input_all_root_modules_enabled"></a> [all\_root\_modules\_enabled](#input\_all\_root\_modules\_enabled) | When set to true, all subdirectories in root\_modules\_path will be treated as root modules. | `bool` | `false` | no |
273
274
| <a name="input_autodeploy"></a> [autodeploy](#input\_autodeploy) | Flag to enable/disable automatic deployment of the stack | `bool` | `true` | no |
274
275
| <a name="input_autoretry"></a> [autoretry](#input\_autoretry) | Flag to enable/disable automatic retry of the stack | `bool` | `false` | no |
0 commit comments