From 20edebf61cdd374ff792eb1dee6cd36e6dceb35c Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Thu, 25 May 2023 14:50:12 +0200 Subject: [PATCH] added some todos --- src/main/python/ddadevops/application/terraform_service.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/python/ddadevops/application/terraform_service.py b/src/main/python/ddadevops/application/terraform_service.py index b093f2a..a2bf4ed 100644 --- a/src/main/python/ddadevops/application/terraform_service.py +++ b/src/main/python/ddadevops/application/terraform_service.py @@ -49,9 +49,11 @@ class TerraformService: output = f"cd {devops.build_path()} && {terraform.latest_cmd()}" print(output) + # TODO: internal? def copy_local_state(self, devops: Devops): self.file_api.cp("terraform.tfstate", devops.build_path(), check=False) + # TODO: internal? def rescue_local_state(self, devops: Devops): self.file_api.cp(f"{devops.build_path()}/terraform.tfstate", ".", check=False) @@ -67,6 +69,7 @@ class TerraformService: self.file_api.cp("*.tfvars", devops.build_path(), check=False) self.file_api.cp_recursive("scripts", devops.build_path(), check=False) + # TODO: internal? def init_client(self, devops: Devops): terraform_domain = devops.specialized_builds[BuildType.TERRAFORM] terraform = Terraform( @@ -84,6 +87,7 @@ class TerraformService: self.__print_terraform_command__(terraform, devops) return terraform + # TODO: internal? def write_output(self, terraform, devops: Devops): terraform_domain = devops.specialized_builds[BuildType.TERRAFORM] result = terraform.output(json=IsFlagged) @@ -92,7 +96,7 @@ class TerraformService: Path(f"{devops.build_path()}{terraform_domain.tf_output_json_name}"), result ) - def read_output(self, devops: Devops): + def read_output(self, devops: Devops) -> map: terraform_domain = devops.specialized_builds[BuildType.TERRAFORM] return self.file_api.read_json_fro_file( Path(f"{devops.build_path()}{terraform_domain.tf_output_json_name}")