breaking change: move credential resolution to outside
This commit is contained in:
parent
cd919357cd
commit
df1a5f09da
1 changed files with 3 additions and 4 deletions
|
@ -2,9 +2,9 @@ from .credential import gopass_credential_from_env_path
|
||||||
from .devops_terraform_build import DevopsTerraformBuild
|
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':
|
config.update({'HetznerMixin':
|
||||||
{'HETZNER_API_KEY_PATH_ENVIRONMENT': hetzner_api_key_path_env}})
|
{'hetzner_api_key': hetzner_api_key}})
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,8 +13,7 @@ class HetznerMixin(DevopsTerraformBuild):
|
||||||
def __init__(self, project, config):
|
def __init__(self, project, config):
|
||||||
super().__init__(project, config)
|
super().__init__(project, config)
|
||||||
hetzner_mixin_config = config['HetznerMixin']
|
hetzner_mixin_config = config['HetznerMixin']
|
||||||
self.hetzner_api_key = gopass_credential_from_env_path(
|
self.hetzner_api_key = hetzner_mixin_config['hetzner_api_key']
|
||||||
hetzner_mixin_config['HETZNER_API_KEY_PATH_ENVIRONMENT'])
|
|
||||||
|
|
||||||
def project_vars(self):
|
def project_vars(self):
|
||||||
ret = super().project_vars()
|
ret = super().project_vars()
|
||||||
|
|
Loading…
Reference in a new issue