@@ -29,6 +29,8 @@ def run(
29
29
subnet_ids = scenario_config ["subnet_id" ]
30
30
duration = scenario_config ["duration" ]
31
31
cloud_type = scenario_config ["cloud_type" ]
32
+ # Add support for user-provided default network ACL
33
+ default_acl_id = scenario_config .get ("default_acl_id" )
32
34
ids = {}
33
35
acl_ids_created = []
34
36
@@ -58,15 +60,22 @@ def run(
58
60
"Network association ids associated with "
59
61
"the subnet %s: %s" % (subnet_id , network_association_ids )
60
62
)
61
- acl_id = cloud_object .create_default_network_acl (vpc_id )
63
+
64
+ # Use provided default ACL if available, otherwise create a new one
65
+ if default_acl_id :
66
+ acl_id = default_acl_id
67
+ # Don't add to acl_id since we didn't create it
68
+ else :
69
+ acl_id = cloud_object .create_default_network_acl (vpc_id )
70
+ acl_ids_created .append (acl_id )
71
+
62
72
new_association_id = cloud_object .replace_network_acl_association (
63
73
network_association_ids [0 ], acl_id
64
74
)
65
75
66
76
# capture the orginal_acl_id, created_acl_id and
67
77
# new association_id to use during the recovery
68
78
ids [new_association_id ] = original_acl_id
69
- acl_ids_created .append (acl_id )
70
79
71
80
# wait for the specified duration
72
81
logging .info (
0 commit comments