Skip to main content

Mimiron a CLI tool whose purpose is to be the glue between your tfvars and Terraform config.

Project description

# Mimiron

[![Build Status](](

**Welcome to mimiron!**

> [Mimiron]( is one of the Titanic Watchers. He once resided at the Temple of Invention, but is absent during the time of Loken's rebellion.

Mimiron a CLI tool whose purpose is to be the glue between your tfvars and Terraform config.

When all of your Terraform config is completely modular, the only sane way to manage variables is to store them inside a `variables.tfvars` file and pass that along when you run `terraform apply`... but where do you store `variables.tfvars`?

Our MVP approach is to store variables inside a separate git repository. Inside the Terraform deployments repo, create a link between the two via `git submodules`, making sure to specify the commit SHA.

This approach is super simple and works but it can be quite cumbersome when you want to make updates. Mimiron provides a few commands to help automate the cumbersome tasks away.

## Installation

$ pip install mimiron

You also need to specify a few environment variables to let Mimiron know where your terraform and tfvar repos are located:

export TF_DEPLOYMENT_PATH="~/workspace/terraform"
export TF_VARS_STAGING_PATH="~/workspace/tfvars-staging"
export TF_VARS_PRODUCTION_PATH="~/workspace/tfvars-prod"

## Usage

>>> mim --help

mim fast-deploy [<artifact>|<service>] [<env>]
mim deploy <env> [--no-push]
mim commit <env>

fast-deploy update ami/sha and auto-deploy after update
deploy updates the tfvars commit sha in deployments
commit generates a commit message based on changes found

<artifact> the deployment artifact we are pushing (e.g. Docker image/AMI)
<service> the application/microservice we're targeting
<env> the environment we want to change

--no-push make local changes without pushing to remote

-h --help shows this
-v --version shows version

Example workflow:

$ mim commit staging
$ mim deploy staging

$ mim fast-deploy

$ mim commit staging
$ mim deploy staging --no-push
$ git add . -A
$ git commit --amend --no-edit
$ git push

## Development

Clone the project:

$ git clone

Setup your virtualenv:

$ mkvirtualenv mimiron

Attach mim to your shell:

$ python develop

## Deployment

Create a `~/.pypirc` and replace the username and password with real credentials:

index-servers =


Register this package to the Cheeseshop:

$ python register -r mimiron

Build a distributable and upload:

$ python sdist upload -r mimiron

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mimiron, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size mimiron-0.0.1.tar.gz (7.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page