This plugin integrates Overmind with env0 to track infrastructure changes and deployments.
The Overmind plugin installs the Overmind CLI (and GitHub CLI) and executes one of four actions:
- submit-plan: Submits a Terraform plan to Overmind for analysis
- start-change: Marks the beginning of a change in Overmind
- end-change: Marks the completion of a change in Overmind
- wait-for-simulation: Retrieves simulation output from Overmind and comments on the relevant GitHub PR or GitLab MR
| Input | Description | Required |
|---|---|---|
action |
The action to perform. Must be one of: submit-plan, start-change, end-change, wait-for-simulation |
Yes |
api_key |
Overmind API key for authentication. Must have the following scopes: account:read, changes:write, config:write, request:receive, sources:read, source:write |
Yes |
tags |
A comma-separated list of key=value tags to attach to the change (only used with submit-plan action) |
No |
post_comment |
Whether wait-for-simulation should post the Overmind markdown to GitHub PR or GitLab MR. Defaults to true when running against a PR/MR, otherwise false. When true, comment_provider must be set. |
No |
comment_provider |
Where wait-for-simulation should post comments when post_comment=true. Must be one of: github, gitlab. |
No |
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 |
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 |
Submit a Terraform plan to Overmind for analysis:
version: 2
deploy:
steps:
terraformPlan:
after:
- name: Submit Plan to Overmind
use: https://github.com/your-org/env0-plugin
inputs:
action: submit-plan
api_key: ${OVERMIND_API_KEY}You can optionally attach tags to the change:
version: 2
deploy:
steps:
terraformPlan:
after:
- name: Submit Plan to Overmind
use: https://github.com/your-org/env0-plugin
inputs:
action: submit-plan
api_key: ${OVERMIND_API_KEY}
tags: environment=production,team=platformMark the beginning of a change in Overmind:
version: 2
deploy:
steps:
terraformApply:
before:
- name: Mark Change Started
use: https://github.com/your-org/env0-plugin
inputs:
action: start-change
api_key: ${OVERMIND_API_KEY}Mark the completion of a change in Overmind:
version: 2
deploy:
steps:
terraformApply:
after:
- name: Mark Change Finished
use: https://github.com/your-org/env0-plugin
inputs:
action: end-change
api_key: ${OVERMIND_API_KEY}Fetch the latest Overmind simulation summary for the current env0 deployment and (optionally) comment on the matching GitHub pull request or GitLab merge request. By default the plugin posts comments whenever the deployment runs in the context of a PR/MR; set post_comment: false to skip commenting. When post_comment=true, you must set comment_provider to github or gitlab. When posting to GitHub, make sure GH_TOKEN is set. When posting to GitLab, make sure GITLAB_TOKEN is set.
version: 2
deploy:
steps:
terraformPlan:
after:
- name: Post Overmind Simulation
use: https://github.com/your-org/env0-plugin
inputs:
action: wait-for-simulation
api_key: ${OVERMIND_API_KEY}
post_comment: false # optional overrideIf you want to post a comment, set comment_provider explicitly:
version: 2
deploy:
steps:
terraformPlan:
after:
- name: Post Overmind Simulation (GitHub)
use: https://github.com/your-org/env0-plugin
inputs:
action: wait-for-simulation
api_key: ${OVERMIND_API_KEY}
post_comment: true
comment_provider: githubversion: 2
deploy:
steps:
terraformPlan:
after:
- name: Post Overmind Simulation (GitLab)
use: https://github.com/your-org/env0-plugin
inputs:
action: wait-for-simulation
api_key: ${OVERMIND_API_KEY}
post_comment: true
comment_provider: gitlabOn GitLab, the plugin updates the merge-request comment on each run instead of adding a new comment every time (see GitLab MR comments below). On GitHub, each run still adds a new PR comment via gh pr comment; update-in-place for GitHub is not implemented in this plugin yet.
For self-hosted GitLab environments where ENV0_PR_SOURCE_REPOSITORY is not available, the plugin falls back to ENV0_TEMPLATE_REPOSITORY to derive the GitLab API URL for posting merge request comments.
For authentication, the plugin uses GITLAB_TOKEN if set, otherwise falls back to ENV0_VCS_ACCESS_TOKEN.
GitLab token scopes: The plugin calls GET /api/v4/user (needs read_user, or a broader scope that includes it) and lists/creates/updates merge request notes (needs api or equivalent project access with comment permissions). A classic personal access token with the api scope satisfies both. Narrower token setups must include at least read_user plus whatever GitLab requires for MR note read/write on your instance.
version: 2
deploy:
steps:
terraformPlan:
after:
- name: Submit Plan to Overmind
use: https://github.com/overmindtech/env0-plugin
inputs:
action: submit-plan
api_key: ${OVERMIND_API_KEY}
terraformApply:
after:
- name: Post Overmind Simulation (Self-Hosted GitLab)
use: https://github.com/overmindtech/env0-plugin
inputs:
action: wait-for-simulation
api_key: ${OVERMIND_API_KEY}
post_comment: true
comment_provider: gitlabNo GITLAB_TOKEN is needed if ENV0_VCS_ACCESS_TOKEN is already available in your env0 environment.
By default, if the plugin step fails (e.g. Overmind API error, missing env var, network issue), env0 treats the step as failed and can block the deployment. To allow the deployment to continue even when this step errors, set on_failure: pass:
- name: Submit Plan to Overmind
use: https://github.com/your-org/env0-plugin
inputs:
action: submit-plan
api_key: ${OVERMIND_API_KEY}
on_failure: pass # deployment continues even if this step failsUse on_failure: pass when the Overmind integration is optional and you do not want plugin failures to block deployments.
Here's a complete example that uses the plan/change lifecycle actions:
version: 2
deploy:
steps:
terraformPlan:
after:
- name: Submit Plan to Overmind
use: https://github.com/your-org/env0-plugin
inputs:
action: submit-plan
api_key: ${OVERMIND_API_KEY}
terraformApply:
before:
- name: Mark Change Started
use: https://github.com/your-org/env0-plugin
inputs:
action: start-change
api_key: ${OVERMIND_API_KEY}
after:
- name: Mark Change Finished
use: https://github.com/your-org/env0-plugin
inputs:
action: end-change
api_key: ${OVERMIND_API_KEY}Note: By default,
submit-planruns only on the first plan (typically the PR/MR plan). The post-approval re-plan is automatically skipped to avoid duplicate Overmind analysis. Setskip_after_approval: falseto submit on every plan.
-
Installation: The plugin automatically installs the latest version of the Overmind CLI and GitHub CLI (for GitHub support) to a writable directory in your PATH. GitLab support uses
curlwhich is typically available on most systems. -
Supply-chain verification: Every binary the plugin downloads is cryptographically verified against the producer workflow's GitHub Artifact Attestation (SLSA build provenance v1) before it is executed. See Supply-chain verification below.
-
Authentication: The API key provided in the
api_keyinput is set as theOVERMIND_API_KEYenvironment variable. -
Action Execution: Based on the
actioninput, the plugin executes the corresponding Overmind/GitHub/GitLab workflow:submit-plan: Uses$ENV0_TF_PLAN_JSONto submit the Terraform planstart-change: Marks the beginning of a change with a ticket link to the env0 deploymentend-change: Marks the completion of a change with a ticket link to the env0 deploymentwait-for-simulation: Retrieves Overmind simulation results as Markdown and (whenpost_comment=true) posts them to the GitHub PR or GitLab MR percomment_provider(GitLab updates the comment in place).
-
Ticket Links: When
ENV0_PR_NUMBERis set (i.e., the deployment is triggered by a PR/MR), the plugin constructs a stable merge request URL fromENV0_PR_SOURCE_REPOSITORY(orENV0_TEMPLATE_REPOSITORYas a fallback) andENV0_PR_NUMBER. This ensures multiple plans for the same MR update the same Overmind change. For non-PR deployments, the ticket link falls back to the env0 deployment URL. -
Post-Approval Re-Plan Gating: env0 always re-runs
terraformPlanbetween approval and apply, even when the code hasn't changed. By default (skip_after_approval: true), the plugin detects this by checkingENV0_REVIEWER_NAME(set by env0 after a reviewer approves) and skips the redundantsubmit-plan. This avoids duplicate Overmind analysis and preventsstart-changefrom waiting on a second analysis that no human will review. Setskip_after_approval: falseif you need both submissions (e.g. auto-deploy environments with no prior PR plan).
The plugin downloads two binaries from public GitHub Releases at runtime — the Overmind CLI from overmindtech/cli and (only for wait-for-simulation with comment_provider: github) the GitHub CLI from cli/cli. Both releases publish GitHub Artifact Attestations carrying SLSA build provenance v1. The plugin verifies the attestation of each archive before extracting and executing the binary inside it.
For every downloaded archive:
- The archive's SHA-256 digest is signed by Sigstore's public-good infrastructure (Fulcio cert + Rekor transparency log).
- The signing certificate's Subject Alternative Name matches
https://github.com/<owner>/<repo>/.github/workflows/release.yml@refs/tags/v*. This binds the artifact to the producer workflow in the producer repository, so a release built from a fork (or from any other workflow file) fails verification. - The OIDC issuer is
https://token.actions.githubusercontent.com. This binds the workflow to a real GitHub Actions run.
Specifically, the producer identities pinned by the plugin are:
| Archive | Repo | Signer workflow |
|---|---|---|
| Overmind CLI | overmindtech/cli |
.github/workflows/release.yml on a v* tag |
GitHub CLI (gh) |
cli/cli |
.github/workflows/release.yml on a v* tag |
The plugin tries the cheaper path first and falls back to the heavier one only when needed:
gh attestation verify(preferred) — ifghis already onPATHand supportsattestation verify(GitHub CLI 2.49+), the plugin runs a singlegh attestation verify <archive> --repo <owner>/<repo> --signer-workflow <owner>/<repo>/.github/workflows/release.yml --cert-oidc-issuer https://token.actions.githubusercontent.comand is done. No new binaries are introduced on the runner.cosignfallback — ifghis missing or too old, the plugin downloads a pinned version of Sigstorecosign, checks it against a pinned SHA-256 (the bootstrap trust anchor; bumped via Renovate), fetches the attestation bundle fromhttps://api.github.com/repos/<owner>/<repo>/attestations/sha256:<digest>, and verifies it withcosign verify-blob-attestation --new-bundle-format ...against the same signer-workflow identity.
The cosign fallback works on Linux/Darwin amd64+arm64 and Windows amd64 (the platforms cosign publishes binaries for). On other platforms (e.g. Linux i386), the plugin requires gh 2.49+ to be pre-installed on the runner and fails loudly otherwise.
For verification to succeed, the env0 runner needs outbound HTTPS to:
api.github.com(attestation index, GitHub CLI release metadata)github.comandobjects.githubusercontent.com(release archive + cosign download)tuf-repo-cdn.sigstore.devandrekor.sigstore.dev(Sigstore trust root + transparency log)
Setting GH_TOKEN (or GITHUB_TOKEN) raises GitHub API rate limits but is not required for verification of public-repo attestations.
A verification failure causes the plugin to exit non-zero with a clear error message and the binary is never executed. on_failure: pass does not bypass this — it is reserved for runtime / API errors (e.g. Overmind unreachable), not supply-chain failures. The exit code reserved for supply-chain failures is 99.
If you see a verification failure on a clean runner, the most common causes are:
- The runner cannot reach the Sigstore endpoints listed above.
- A new Overmind CLI release has been published without attestations (regression on the producer side — please file an issue).
- The cosign SHA-256 pin in the plugin is stale relative to the cosign version it tries to download (Renovate is responsible for keeping these in sync; manual fix is
sh scripts/update-cosign-pins.shafter bumpingCOSIGN_VERSION).
-
The plugin requires env0 environment variables to be available:
ENV0_PROJECT_IDENV0_ENVIRONMENT_IDENV0_DEPLOYMENT_LOG_IDENV0_ORGANIZATION_IDENV0_TF_PLAN_JSON(for submit-plan action)ENV0_PR_NUMBER(only whenwait-for-simulationposts comments, i.e., running against a PR/MR)ENV0_PR_SOURCE_REPOSITORY(only whenwait-for-simulationposts comments to GitHub; for GitLab, falls back toENV0_TEMPLATE_REPOSITORY)
-
A valid Overmind API key with the following required scopes:
account:readchanges:writeconfig:writerequest:receivesources:readsource:write
-
GitHub authentication for the CLI when
wait-for-simulationposts to GitHub (setGH_TOKEN). -
GitLab authentication when
wait-for-simulationposts to GitLab (setGITLAB_TOKEN, or rely onENV0_VCS_ACCESS_TOKENwhich is automatically available in self-hosted GitLab environments). See Self-Hosted GitLab for minimum scopes (apion a classic PAT is sufficient).
wait-for-simulation calls gh pr comment for GitHub repositories, which requires a GitHub personal access token. To create one:
- Sign in to GitHub and open https://github.com/settings/tokens/new (or the fine-grained token wizard).
- Choose Classic token, set an expiry that matches your security policy, and select the repo scope (read/write is needed to comment on PRs).
- Generate the token and copy it immediately—GitHub will not show it again.
- Store the token securely in env0 (for example as an environment variable or secret) and expose it to the plugin as
GH_TOKEN.
wait-for-simulation uses the GitLab API to post comments on merge requests for GitLab repositories. To create a GitLab personal access token:
- Sign in to GitLab and navigate to your user settings (or group/project settings for project/group tokens).
- Go to Access Tokens (or Preferences > Access Tokens for user tokens).
- Create a new token with the
apiscope (coversGET /api/v4/userand merge request note APIs used by this plugin). - Generate the token and copy it immediately—GitLab will not show it again.
- Store the token securely in env0 (for example as an environment variable or secret) and expose it to the plugin as
GITLAB_TOKEN.
Note: When post_comment=true, you must set comment_provider to github or gitlab.
To update the same MR note on each deployment, the plugin looks for a non-system note authored by the token’s user whose body contains the HTML marker <!-- overmind-change-summary -->. Overmind’s default markdown includes this marker; if it is missing, the plugin warns, appends the marker to the posted body, and subsequent runs can match and update that note.
env0 resolves use: https://github.com/org/env0-plugin to the default branch unless you pin a revision. To avoid picking up breaking changes—or to roll back after an upgrade—append @<ref> to the URL (tag, branch, or commit SHA), per env0’s plugin documentation:
use: https://github.com/overmindtech/env0-plugin@v1.2.3
# or: https://github.com/overmindtech/env0-plugin@abc1234deadbeef...- The plugin automatically detects the operating system and architecture to download the correct Overmind CLI binary.
- The installation directory is automatically selected from writable directories in your PATH.
- For the
submit-planaction, theENV0_TF_PLAN_JSONenvironment variable must be set (this is automatically provided by env0 after a terraform plan step).