refactor project if used for terraform
This commit is contained in:
parent
7f7b562409
commit
5a376ada87
1 changed files with 13 additions and 0 deletions
|
@ -15,8 +15,21 @@ def hetzner_api_key(project):
|
|||
def stage(project):
|
||||
return project.get_property('stage')
|
||||
|
||||
def module(project):
|
||||
return project.get_property('name')
|
||||
|
||||
def tf_import_name(project):
|
||||
return project.get_property('tf_import_name')
|
||||
|
||||
def tf_import_resource(project):
|
||||
return project.get_property('tf_import_resource')
|
||||
|
||||
def project_dict(project):
|
||||
my_hetzner_api_key = hetzner_api_key(project)
|
||||
my_module = project.name
|
||||
ret = {'stage' : stage(project)}
|
||||
if my_hetzner_api_key:
|
||||
ret['hetzner_api_key'] = my_hetzner_api_key
|
||||
if my_module:
|
||||
ret['module'] = my_module
|
||||
return ret
|
Loading…
Reference in a new issue