From df1a5f09da54c36d4637d13b66ca7c6f5bc2a48b Mon Sep 17 00:00:00 2001 From: jem Date: Fri, 17 Apr 2020 17:58:33 +0200 Subject: [PATCH] breaking change: move credential resolution to outside --- src/main/python/ddadevops/hetzner_mixin.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/python/ddadevops/hetzner_mixin.py b/src/main/python/ddadevops/hetzner_mixin.py index dec5460..dfea6ec 100644 --- a/src/main/python/ddadevops/hetzner_mixin.py +++ b/src/main/python/ddadevops/hetzner_mixin.py @@ -2,9 +2,9 @@ from .credential import gopass_credential_from_env_path from .devops_terraform_build import DevopsTerraformBuild -def add_hetzner_mixin_config(config, hetzner_api_key_path_env='HETZNER_API_KEY_PATH'): +def add_hetzner_mixin_config(config, hetzner_api_key): config.update({'HetznerMixin': - {'HETZNER_API_KEY_PATH_ENVIRONMENT': hetzner_api_key_path_env}}) + {'hetzner_api_key': hetzner_api_key}}) return config @@ -13,8 +13,7 @@ class HetznerMixin(DevopsTerraformBuild): def __init__(self, project, config): super().__init__(project, config) hetzner_mixin_config = config['HetznerMixin'] - self.hetzner_api_key = gopass_credential_from_env_path( - hetzner_mixin_config['HETZNER_API_KEY_PATH_ENVIRONMENT']) + self.hetzner_api_key = hetzner_mixin_config['hetzner_api_key'] def project_vars(self): ret = super().project_vars()