diff --git a/pacu/modules/cloudformation__download_data/main.py b/pacu/modules/cloudformation__download_data/main.py index 67606db9..c8500322 100755 --- a/pacu/modules/cloudformation__download_data/main.py +++ b/pacu/modules/cloudformation__download_data/main.py @@ -63,11 +63,11 @@ def default(self, obj): print(f"Error: Could not enumerate region {region}") print(f"Error: {e}") continue - exports = client.list_exports() - if exports: - with outfile('exports', region) as (f): - json.dump(exports, f, indent=1) - find_secrets(json.dumps(exports)) + exports = client.list_exports() + if exports: + with outfile('exports', region) as (f): + json.dump(exports, f, indent=1) + find_secrets(json.dumps(exports)) while 'NextToken' in stacks_data: stacks_data = client.describe_stacks(NextToken=(stacks_data['NextToken'])) stacks += stacks_data['Stacks']