https://overmind.tech
For the first time you don't have to wait for the worst when you push a change. Discover and detect the risks you can't see. Overmind gives you the insight of a post-mortem without the fallout of broken infra.
🎥 Watch a demo | 📖 How it works | 🚀 Sign up | 💻 Playground | 🙌 Follow us
This example repo shows how to run terraform on GitHub Actions and automatically submit each PR's changes to Overmind, reporting back the blast radius as a comment on the PR. You can see that in action in this PR.
Please note: You are unable to view the change in Overmind as it is a change tied to our personal account.
If you would like to use this repo as an example. Follow these steps:
- Fork the repo
- Comment out the S3 section:
terraform {
# backend "s3" {
# bucket = "replaceme-with-a-unique-bucket-name"
# dynamodb_table = "overmind-tf-example-state"
# key = "terraform-example.tfstate"
# region = "eu-west-2"
# }
}
- Replace all instances of
replaceme-with-a-unique-bucket-name
interraform.tf
with a unique bucket name for your environment - Replace
repo:overmindtech/terraform-example:*
withrepo:[YOUR USERNAME]/terraform-example:*
, replacing[YOUR USERNAME]
with your Github username - Run
terraform init
- Run
terraform plan
to see what resources need to be set up - Run
terraform apply
. This will set up the resources required for storing state and locks - Un-comment the
backend "s3"
section fromterraform.tf
and runterraform init -migrate-state
. This will migrate your state from your local device to S3 - Run
terraform plan
which should show no changes
Some notes to get started with replicating this on your own setup.
-
Create AWS account
-
Configure AWS cli to access account
aws configure sso
; docs
-
Setup the
AWS_PROFILE
environment variable to point at your local profile.- Note that because of this issue in terraform, the created
~/.aws/config
needs to be adjusted (see especially this comment for details) - If you use VSCode Dev Containers,
.devcontainer/devcontainer.json
has guidance on how to permanently configureAWS_PROFILE
and import your user's AWS config
- Note that because of this issue in terraform, the created
-
Setup S3 and DynamoDB for remote state storage docs
- follow the comments on the
terraform{}
block to bootstrap this in a new account
- follow the comments on the
-
Configure OIDC access for github actions docs
-
Supply the ARN of the created role (terraform output
terraform_deploy_role
) asTERRAFORM_DEPLOY_ROLE
and an Overmind API asOVM_API_KEY
through the "Actions secrets and variables" page in the repo settings.