fix(cloudtrail): check if trails exist in service (#4161)

This commit is contained in:
Sergio Garcia
2024-06-03 17:05:39 -04:00
committed by GitHub
parent 0c01cf28c4
commit 366bb91a1e
@@ -37,7 +37,7 @@ class Cloudtrail(AWSService):
trails_count = 0
for trail in describe_trails:
# If a multi region trail was already retrieved in another region
if trail["TrailARN"] in self.trails.keys():
if self.trails and trail["TrailARN"] in self.trails.keys():
continue
if not self.audit_resources or (