Skip to content

Commit 2ebff1b

Browse files
committed
fix: API call list_tags_for_resource
1 parent 35ff599 commit 2ebff1b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

prowler/providers/aws/services/codepipeline/codepipeline_service.py

+13-1
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,20 @@ def _get_pipeline_state(self, pipeline):
9292
type=source_info["actionTypeId"]["provider"],
9393
location=source_info["configuration"].get("FullRepositoryId", ""),
9494
configuration=source_info["configuration"],
95-
tags=pipeline_info.get("tags", []),
9695
)
96+
97+
# Get tags using list_tags_for_resource API
98+
try:
99+
tags_response = regional_client.list_tags_for_resource(
100+
resourceArn=pipeline.arn
101+
)
102+
pipeline.tags = tags_response.get("tags", [])
103+
except ClientError as error:
104+
logger.error(
105+
f"Error getting tags for pipeline {pipeline.name}: {error}"
106+
)
107+
pipeline.tags = []
108+
97109
except ClientError as error:
98110
logger.error(
99111
f"{pipeline.region} -- {error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"

0 commit comments

Comments
 (0)