diff --git a/infrapatch/core/provider_handler.py b/infrapatch/core/provider_handler.py index ff69308..38d2970 100644 --- a/infrapatch/core/provider_handler.py +++ b/infrapatch/core/provider_handler.py @@ -2,6 +2,7 @@ import logging as log from pathlib import Path from typing import Sequence, Union +from rich import progress from git import Repo from pytablewriter import MarkdownTableWriter from rich.console import Console @@ -50,7 +51,7 @@ def upgrade_resources(self) -> bool: return False upgradable_resources = self.get_upgradable_resources() for provider_name, resources in upgradable_resources.items(): - for resource in resources: + for resource in progress.track(resources, description=f"Upgrading resources for Provider {self.providers[provider_name].get_provider_display_name()}..."): try: resource = self.providers[provider_name].patch_resource(resource) except Exception as e: diff --git a/infrapatch/core/providers/terraform/base_terraform_provider.py b/infrapatch/core/providers/terraform/base_terraform_provider.py index 7922678..b0776f7 100644 --- a/infrapatch/core/providers/terraform/base_terraform_provider.py +++ b/infrapatch/core/providers/terraform/base_terraform_provider.py @@ -37,7 +37,7 @@ def get_resources(self) -> Sequence[VersionedResource]: return [] resources = [] - for terraform_file in progress.track(terraform_files, description=f"Parsing .tf files for {self.get_provider_name()}..."): + for terraform_file in progress.track(terraform_files, description=f"Parsing .tf files for {self.get_provider_display_name()}..."): if self.get_provider_name() == "terraform_modules": resources.extend(self.hcl_handler.get_terraform_resources_from_file(terraform_file, get_modules=True, get_providers=False)) @@ -47,7 +47,7 @@ def get_resources(self) -> Sequence[VersionedResource]: else: raise Exception(f"Provider name '{self.get_provider_name()}' is not implemented.") - for resource in progress.track(resources, description="Getting newest resource versions..."): + for resource in progress.track(resources, description=f"Getting newest resource versions for Provider {self.get_provider_display_name()}..."): resource.newest_version = self.registry_handler.get_newest_version(resource) return resources