Skip to content

Instantly share code, notes, and snippets.

@lisakoivu
Created October 10, 2018 22:16
Show Gist options
  • Save lisakoivu/f0de13d16d0b14eb9a047ae5a840f64d to your computer and use it in GitHub Desktop.
Save lisakoivu/f0de13d16d0b14eb9a047ae5a840f64d to your computer and use it in GitHub Desktop.
decrypting a master password from infrastructure-blackbox
Authenticate to the relevant account. In this case, the account is front end staging.
Clone the blackbox repo locally.
Find the file that you wish to decrypt.
Pipe it into gruntkms.
cat mysql-stage-master-password.kms.encrympted |gruntkms decrypt --aws-region us-west-2
In this case, the string returned will be the mysql master password in fe-stg.
In order to make terragrunt code aware of this password while running against George, put it in an environment variable named TF_VAR_master_password.
Darn it George.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment