diff --git a/src/main/python/ddadevops/domain/provider_tf_backend_git.py b/src/main/python/ddadevops/domain/provider_tf_backend_git.py index 4f450f8..0289a79 100644 --- a/src/main/python/ddadevops/domain/provider_tf_backend_git.py +++ b/src/main/python/ddadevops/domain/provider_tf_backend_git.py @@ -47,17 +47,23 @@ class TerraformBackendGit(Validateable, CredentialMappingDefault): def is_local_state(self): return False - # ToDo: - def __bucket_key__(self): - pass + def __make_http_backend_address__(self) -> str: + # TODO Should we make this configurable? + base_string = "http://localhost:6061/?type=git" + return f"{base_string}&repository={self.git_backend_repo}&ref={self.git_backend_ref}&state={self.stage}/{self.module}/{self.git_backend_state}.json" - # ToDo: - def __make_http_backend_address__(self): - pass - - # ToDo: + # TODO: Implement ssh auth too @classmethod - def get_mapping_default(): - pass - - + def get_mapping_default(cls) -> List[Dict[str, str]]: + return [ + { + "gopass_path": "server/meissa/repo/terraform-backend-git-test", + "gopass_field": "user", + "name": "git_backend_username", + }, + { + "gopass_path": "server/meissa/repo/terraform-backend-git-test", + "gopass_field": "token", + "name": "git_backend_token", + }, + ]