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 |
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:
terraformApply:
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:
terraformApply:
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:
terraformApply:
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: gitlabHere'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}-
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. -
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 (automatically detected based on repository URL)
-
Ticket Links: All actions automatically construct a ticket link to the env0 deployment using environment variables (
ENV0_PROJECT_ID,ENV0_ENVIRONMENT_ID,ENV0_DEPLOYMENT_LOG_ID,ENV0_ORGANIZATION_ID).
-
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, used to detect GitHub vs GitLab)
-
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).
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 (read/write is needed to comment on merge requests). - 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.
- 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).