fix(azure): handle new FlowLog properties (#7546)

This commit is contained in:
Sergio Garcia
2025-04-22 08:21:17 -05:00
committed by GitHub
parent 00f1c02532
commit e897978c3e
2 changed files with 13 additions and 9 deletions

View File

@@ -22,6 +22,7 @@ All notable changes to the **Prowler SDK** are documented in this file.
- Fix package name location in pyproject.toml while replicating for prowler-cloud [(#7531)](https://github.com/prowler-cloud/prowler/pull/7531).
- Remove cache in PyPI release action [(#7532)](https://github.com/prowler-cloud/prowler/pull/7532).
- Add the correct values for logger.info inside iam service [(#7526)](https://github.com/prowler-cloud/prowler/pull/7526).
- Handle new FlowLog model properties in Azure [(#7546)](https://github.com/prowler-cloud/prowler/pull/7546).
---

View File

@@ -78,15 +78,18 @@ class Network(AzureService):
FlowLog(
id=flow_log.id,
name=flow_log.name,
enabled=getattr(
getattr(flow_log, "properties", None),
"enabled",
False,
),
retention_policy=getattr(
getattr(flow_log, "properties", None),
"retentionPolicy",
None,
enabled=flow_log.enabled,
retention_policy=RetentionPolicy(
enabled=(
flow_log.retention_policy.enabled
if flow_log.retention_policy
else False
),
days=(
flow_log.retention_policy.days
if flow_log.retention_policy
else 0
),
),
)
for flow_log in flow_logs