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
Copy file name to clipboardExpand all lines: README.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,12 @@ The Overmind plugin installs the Overmind CLI (and GitHub CLI) and executes one
22
22
|`comment_provider`| Where `wait-for-simulation` should post comments when `post_comment=true`. Must be one of: `github`, `gitlab`. | No |
23
23
|`on_failure`| Behavior when the plugin step errors. `fail` (default) fails the step and blocks the deployment; `pass` allows the deployment to continue even if this step errors. Must be one of: `fail`, `pass`. | No |
24
24
|`skip_after_approval`| When `true` (default), `submit-plan` exits early once a deployment has been approved (`ENV0_REVIEWER_NAME` is set), avoiding duplicate analysis from the post-approval re-plan. Set to `false` to submit on every plan. | No |
25
+
|`timeout`| Wall-clock time limit for the entire Overmind CLI invocation after login, including any polling for analysis or snapshot completion (e.g. `45m`). Accepts any Go duration string. Defaults to the CLI default of `31m`. Must be longer than the expected analysis time; the 30-minute service hard cap on analysis is separate from this value. Applies to all actions. | No |
26
+
|`change_analysis_target_duration`| Soft server-side target duration for change analysis planning used with `submit-plan` (e.g. `5m`, `20m`). The blast-radius phase uses 67% of this value; the remaining 33% covers hypothesis formation. Valid range: `1m`–`30m`. Defaults to account-level settings. | No |
27
+
|`blast_radius_link_depth`| How many relationship levels deep to traverse when calculating the blast radius (used with `submit-plan`). Larger values give a more complete picture but take longer. Defaults to account-level settings. | No |
28
+
|`blast_radius_max_items`| Maximum number of resources to include in the blast radius calculation (used with `submit-plan`). Larger values give a more complete picture but take longer. Defaults to account-level settings. | No |
29
+
|`risk_levels`| Comma-separated list of risk severities to include in the `wait-for-simulation` output (e.g. `high,medium`). Allowed values: `high`, `medium`, `low`. Defaults to all three. | No |
30
+
|`wait_for_snapshot`| When `true`, `start-change` blocks until the pre-change snapshot is fully captured before returning. Defaults to `false` (snapshot runs in background). | No |
25
31
26
32
## Usage
27
33
@@ -192,6 +198,53 @@ By default, if the plugin step fails (e.g. Overmind API error, missing env var,
192
198
193
199
Use `on_failure: pass` when the Overmind integration is optional and you do not want plugin failures to block deployments.
194
200
201
+
### Tuning Analysis
202
+
203
+
For large or complex infrastructure, you can tune how deep and how long the blast-radius analysis runs using three optional `submit-plan` inputs. These map directly to the corresponding Overmind CLI flags; see the [Overmind CLI configuration docs](https://docs.overmind.tech/cli/configuration) for full details.
204
+
205
+
```yaml
206
+
version: 2
207
+
deploy:
208
+
steps:
209
+
terraformPlan:
210
+
after:
211
+
- name: Submit Plan to Overmind
212
+
use: https://github.com/overmindtech/env0-plugin
213
+
inputs:
214
+
action: submit-plan
215
+
api_key: ${OVERMIND_API_KEY}
216
+
timeout: 45m # wall-clock limit for the CLI invocation
Copy file name to clipboardExpand all lines: env0.plugin.yaml
+55-2Lines changed: 55 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,24 @@ inputs:
25
25
skip_after_approval:
26
26
description: "When true (default), submit-plan exits early once a deployment has been approved (ENV0_REVIEWER_NAME is set), avoiding wasted resubmission of the post-approval re-plan. Set to false to submit on every plan, including the apply pipeline's re-plan."
27
27
required: false
28
+
timeout:
29
+
description: "Wall-clock time limit for the entire Overmind CLI invocation after login, including any polling for analysis or snapshot completion (e.g. '45m'). Accepts any Go duration string. Defaults to the CLI default of 31m. Must be longer than the expected analysis time; the 30-minute service hard cap on analysis is separate from this value."
30
+
required: false
31
+
change_analysis_target_duration:
32
+
description: "Soft server-side target duration for change analysis planning used with submit-plan (e.g. '5m', '20m'). The blast-radius phase uses 67% of this value; the remaining 33% covers hypothesis formation. Valid range: 1m–30m. Defaults to account-level settings."
33
+
required: false
34
+
blast_radius_link_depth:
35
+
description: "How many relationship levels deep to traverse when calculating the blast radius (used with submit-plan). Larger values give a more complete picture but take longer. Defaults to account-level settings."
36
+
required: false
37
+
blast_radius_max_items:
38
+
description: "Maximum number of resources to include in the blast radius calculation (used with submit-plan). Larger values give a more complete picture but take longer. Defaults to account-level settings."
39
+
required: false
40
+
risk_levels:
41
+
description: "Comma-separated list of risk severities to include in the wait-for-simulation output (e.g. 'high,medium'). Allowed values: high, medium, low. Defaults to all three."
42
+
required: false
43
+
wait_for_snapshot:
44
+
description: "When true, start-change blocks until the pre-change snapshot is fully captured before returning. Defaults to false (snapshot runs in background)."
45
+
required: false
28
46
run:
29
47
exec: |
30
48
#!/bin/sh
@@ -530,6 +548,18 @@ run:
530
548
if [ -n "${DIFF_FILE}" ]; then
531
549
set -- "$@" --code-changes-diff "${DIFF_FILE}"
532
550
fi
551
+
if [ -n "${inputs.change_analysis_target_duration}" ]; then
552
+
set -- "$@" --change-analysis-target-duration "${inputs.change_analysis_target_duration}"
553
+
fi
554
+
if [ -n "${inputs.blast_radius_link_depth}" ]; then
555
+
set -- "$@" --blast-radius-link-depth "${inputs.blast_radius_link_depth}"
556
+
fi
557
+
if [ -n "${inputs.blast_radius_max_items}" ]; then
558
+
set -- "$@" --blast-radius-max-items "${inputs.blast_radius_max_items}"
559
+
fi
560
+
if [ -n "${inputs.timeout}" ]; then
561
+
set -- "$@" --timeout "${inputs.timeout}"
562
+
fi
533
563
"$@"
534
564
535
565
# Clean up diff file if created
@@ -539,13 +569,30 @@ run:
539
569
;;
540
570
start-change)
541
571
echo "Starting change in Overmind..."
542
-
"${INSTALL_DIR}/overmind" changes start-change \
572
+
set -- "${INSTALL_DIR}/overmind" changes start-change \
543
573
--ticket-link "${ticket_link}"
574
+
if [ -n "${inputs.app}" ]; then
575
+
set -- "$@" --app "${inputs.app}"
576
+
fi
577
+
if [ "$(echo "${inputs.wait_for_snapshot}" | tr '[:upper:]' '[:lower:]')" = "true" ]; then
578
+
set -- "$@" --wait-for-snapshot
579
+
fi
580
+
if [ -n "${inputs.timeout}" ]; then
581
+
set -- "$@" --timeout "${inputs.timeout}"
582
+
fi
583
+
"$@"
544
584
;;
545
585
end-change)
546
586
echo "Ending change in Overmind..."
547
-
"${INSTALL_DIR}/overmind" changes end-change \
587
+
set -- "${INSTALL_DIR}/overmind" changes end-change \
548
588
--ticket-link "${ticket_link}"
589
+
if [ -n "${inputs.app}" ]; then
590
+
set -- "$@" --app "${inputs.app}"
591
+
fi
592
+
if [ -n "${inputs.timeout}" ]; then
593
+
set -- "$@" --timeout "${inputs.timeout}"
594
+
fi
595
+
"$@"
549
596
;;
550
597
wait-for-simulation)
551
598
echo "Waiting for Overmind simulation and commenting on PR/MR..."
@@ -574,6 +621,12 @@ run:
574
621
if [ -n "${inputs.app}" ]; then
575
622
set -- "$@" --app "${inputs.app}"
576
623
fi
624
+
if [ -n "${inputs.risk_levels}" ]; then
625
+
set -- "$@" --risk-levels "${inputs.risk_levels}"
626
+
fi
627
+
if [ -n "${inputs.timeout}" ]; then
628
+
set -- "$@" --timeout "${inputs.timeout}"
629
+
fi
577
630
if ! "$@" > "${MARKDOWN_FILE}"; then
578
631
echo "Error: Failed to retrieve change markdown from Overmind"
0 commit comments