Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

make kms decryption region a parameterised information #83

Closed
lotharschulz opened this issue Apr 9, 2018 · 1 comment
Closed

make kms decryption region a parameterised information #83

lotharschulz opened this issue Apr 9, 2018 · 1 comment

Comments

@lotharschulz
Copy link
Contributor

remove hard coded AWS region:
https://github.com/zalando/ghe-backup/blob/master/convert-kms-private-ssh-key.sh#L36

@rashamalek
Copy link
Contributor

based on Instance Identity Documents
we can extract an instance using document endpoint

REGION=`curl http://169.254.169.254/latest/dynamic/instance-identity/document | grep region | awk -F\" '{print $4}'`
sed  "s/eu-central-1/$REGION/g" /kms/convert-kms-private-ssh-key_original.sh

Simple and quickest solution would be to replace it in the /kms/convert-kms-private-ssh-key.sh file using sed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants