Skip to content

Commit

Permalink
refactor: DBTP-1684 Pipelines (#742)
Browse files Browse the repository at this point in the history
  • Loading branch information
chiaramapellimt authored Jan 29, 2025
1 parent bb4a38f commit 45df540
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dbt_platform_helper/domain/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from dbt_platform_helper.providers.config import ConfigProvider
from dbt_platform_helper.providers.ecr import ECRProvider
from dbt_platform_helper.providers.files import FileProvider
from dbt_platform_helper.providers.terraform_manifest import TerraformManifestProvider
from dbt_platform_helper.providers.io import ClickIOProvider
from dbt_platform_helper.providers.terraform_manifest import TerraformManifestProvider
from dbt_platform_helper.utils.application import get_application_name
from dbt_platform_helper.utils.template import setup_templates
from dbt_platform_helper.utils.versioning import (
Expand All @@ -28,13 +28,15 @@ def __init__(
get_git_remote: Callable[[], str],
get_codestar_arn: Callable[[str], str],
io: ClickIOProvider = ClickIOProvider(),
file_provider: FileProvider = FileProvider(),
):
self.config_provider = config_provider
self.get_git_remote = get_git_remote
self.get_codestar_arn = get_codestar_arn
self.terraform_manifest_provider = terraform_manifest_provider
self.ecr_provider = ecr_provider
self.io = io
self.file_provider = file_provider

def generate(self, cli_terraform_platform_modules_version: str, deploy_branch: str):
platform_config = self.config_provider.load_and_validate_platform_config()
Expand Down Expand Up @@ -131,4 +133,6 @@ def _generate_terraform_environment_pipeline_manifest(
dir_path = f"terraform/environment-pipelines/{aws_account}"
makedirs(dir_path, exist_ok=True)

self.io.info(FileProvider.mkfile(".", f"{dir_path}/main.tf", contents, overwrite=True))
self.io.info(
self.file_provider.mkfile(".", f"{dir_path}/main.tf", contents, overwrite=True)
)

0 comments on commit 45df540

Please sign in to comment.