From fee7b5a0916fce551212c3c1becb11d14fc0da07 Mon Sep 17 00:00:00 2001 From: Nikita Melkozerov Date: Mon, 21 Oct 2024 11:31:33 +0200 Subject: [PATCH] Enable access_edges via env variable (#2262) --- plugins/aws/fix_plugin_aws/collector.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/aws/fix_plugin_aws/collector.py b/plugins/aws/fix_plugin_aws/collector.py index 03a08346c5..9911d0ea9e 100644 --- a/plugins/aws/fix_plugin_aws/collector.py +++ b/plugins/aws/fix_plugin_aws/collector.py @@ -2,6 +2,7 @@ from collections import defaultdict from concurrent.futures import Future, ThreadPoolExecutor from datetime import datetime, timedelta, timezone +import os from typing import List, Type, Optional, Union, cast, Any from fix_plugin_aws.access_edges import AccessEdgeCreator @@ -262,7 +263,7 @@ def get_last_run() -> Optional[datetime]: log.warning(f"Unexpected node type {node} in graph") raise Exception("Only AWS resources expected") - access_edge_collection_enabled = False + access_edge_collection_enabled = os.environ.get("ACCESS_EDGE_COLLECTION_ENABLED", "false").lower() == "true" if access_edge_collection_enabled and global_builder.config.collect_access_edges: # add access edges log.info(f"[Aws:{self.account.id}] Create access edges.")