Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/actions/go_init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ runs:
with:
repository: overmindtech/aws-source
path: ./aws-source
- name: Checkout
uses: actions/checkout@v3
with:
repository: overmindtech/k8s-source
path: ./k8s-source

- name: Move sources in place
shell: bash
run: mv -v aws-source ..
run: |
mv -v aws-source ..
mv -v k8s-source ..

- name: Go Generate
shell: bash
Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,26 @@ terraform show -json ./tfplan > ./tfplan.json
ovm-cli submit-plan --title "example change" --plan-json ./tfplan.json
```

## Terraform ➡ Overmind Mapping

In order to calculate the blast radius from a Terraform plan, we use mappings provided by the sources to map a Terraform resource change to an Overmind item. In many cases this is simple, however in some instances, the plan doesn't have enough information for us to determine which resource the change is referring to. A good example is a Terraform environment that manages 2x Kubernetes deployments in 2x clusters which both have the same name.

By default we'll add both deployments to the blast radius since we can't tell them apart. However to improve the results, you can add the `overmind_mappings` output to your plan:

```hcl
output "overmind_mappings" {
value = {
# The key here should be the name of the provider. Resources that use this
# provider will be mapped to a cluster with the below name. If you had
# another provider with an alias such as "prod" the name would be
# "kubernetes.prod"
kubernetes = {
cluster_name = var.terraform_env_name
}
}
}
```

Valid mapping values are:

* `cluster_name`: The name of the cluster that was provided to the kubernetes source using the `source.clusterName` option
Loading