Work around for Go SDK bug to allow SOPS to work

This commit is contained in:
Stefan Reimer 2020-04-20 23:00:39 +01:00
parent afe3e35d4c
commit 3fd4a9640a
3 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,8 @@
# Changelog # Changelog
## 0.8.1
- Work around for bug in Go AWS SDK to pick up cli credentials, see https://github.com/aws/aws-sdk-go/issues/934
## 0.8.0 ## 0.8.0
- Added support for sops encrypted config files, see: https://github.com/mozilla/sops - Added support for sops encrypted config files, see: https://github.com/mozilla/sops
- hide stack parameter output in terminal if `NoEcho` is set - hide stack parameter output in terminal if `NoEcho` is set

View File

@ -2,7 +2,7 @@ import logging
__author__ = "Stefan Reimer" __author__ = "Stefan Reimer"
__email__ = "stefan@zero-downtimet.net" __email__ = "stefan@zero-downtimet.net"
__version__ = "0.8.0" __version__ = "0.8.1"
# Set up logging to ``/dev/null`` like a library is supposed to. # Set up logging to ``/dev/null`` like a library is supposed to.

View File

@ -247,7 +247,8 @@ def _sops_loader(path):
'--input-type', 'yaml', '--input-type', 'yaml',
'--output-type', 'yaml', '--output-type', 'yaml',
'--decrypt', '/dev/stdin' '--decrypt', '/dev/stdin'
], stdout=subprocess.PIPE, input=config_raw.encode('utf-8')) ], stdout=subprocess.PIPE, input=config_raw.encode('utf-8'),
env=dict(os.environ, **{"AWS_SDK_LOAD_CONFIG": "1"}))
except FileNotFoundError: except FileNotFoundError:
logger.exception("SOPS encrypted config {}, but unable to find sops binary! Try eg: https://github.com/mozilla/sops/releases/download/v3.5.0/sops-v3.5.0.linux".format(path)) logger.exception("SOPS encrypted config {}, but unable to find sops binary! Try eg: https://github.com/mozilla/sops/releases/download/v3.5.0/sops-v3.5.0.linux".format(path))
sys.exit(1) sys.exit(1)