@@ -675,13 +675,13 @@ def load_policy_from_arm_template_str(
675675 containers = []
676676 existing_containers = None
677677 fragments = None
678- exclude_default_fragments = False
678+ exclude_default_fragments_this_group = exclude_default_fragments
679679
680680 tags = case_insensitive_dict_get (resource , config .ACI_FIELD_TEMPLATE_TAGS )
681681 if tags :
682- exclude_default_fragments = case_insensitive_dict_get (tags , config .ACI_FIELD_TEMPLATE_ZERO_SIDECAR )
683- if isinstance (exclude_default_fragments , str ):
684- exclude_default_fragments = exclude_default_fragments .lower () == "true"
682+ exclude_default_fragments_this_group = case_insensitive_dict_get (tags , config .ACI_FIELD_TEMPLATE_ZERO_SIDECAR )
683+ if isinstance (exclude_default_fragments_this_group , str ):
684+ exclude_default_fragments_this_group = exclude_default_fragments_this_group .lower () == "true"
685685
686686 container_group_properties = case_insensitive_dict_get (
687687 resource , config .ACI_FIELD_TEMPLATE_PROPERTIES
@@ -725,7 +725,7 @@ def load_policy_from_arm_template_str(
725725 # In non-diff mode, we ignore the error and proceed without the policy
726726 existing_containers , fragments = ([], [])
727727
728- rego_fragments = copy .deepcopy (config .DEFAULT_REGO_FRAGMENTS ) if not exclude_default_fragments else []
728+ rego_fragments = copy .deepcopy (config .DEFAULT_REGO_FRAGMENTS ) if not exclude_default_fragments_this_group else []
729729 if infrastructure_svn :
730730 # assumes the first DEFAULT_REGO_FRAGMENT is always the
731731 # infrastructure fragment
0 commit comments