This repository was archived by the owner on Nov 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-11
lines changed
utils/add-corpus-storage-accounts Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ resource eventGridSystemTopics 'Microsoft.EventGrid/systemTopics@2021-12-01' = {
1616}
1717
1818resource eventSubscriptions 'Microsoft.EventGrid/systemTopics/eventSubscriptions@2021-12-01' = {
19- name : 'onefuzz1_subscription '
19+ name : 'onefuzz1-subscription '
2020 parent : eventGridSystemTopics
2121 properties : {
2222 destination : {
Original file line number Diff line number Diff line change @@ -877,16 +877,18 @@ def remove_eventgrid(self) -> None:
877877 )
878878
879879 # Event subscription for version up to 5.1.0
880- old_subscription_name = "onefuzz1"
881- old_subscription_exists = Client .event_subscription_exists (
882- event_grid_client , src_resource_id , old_subscription_name
883- )
880+ # or 7.1.0
881+ old_subscription_names = ["onefuzz1" , "onefuzz1_subscription" ]
882+ for old_subscription_name in old_subscription_names :
883+ old_subscription_exists = Client .event_subscription_exists (
884+ event_grid_client , src_resource_id , old_subscription_name
885+ )
884886
885- if old_subscription_exists :
886- logger .info ("removing deprecated event subscription" )
887- event_grid_client .event_subscriptions .begin_delete (
888- src_resource_id , old_subscription_name
889- ).wait ()
887+ if old_subscription_exists :
888+ logger .info ("removing deprecated event subscription" )
889+ event_grid_client .event_subscriptions .begin_delete (
890+ src_resource_id , old_subscription_name
891+ ).wait ()
890892
891893 def add_instance_id (self ) -> None :
892894 logger .info ("setting instance_id log export" )
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def get_base_event(
3131 resource_group , location
3232 ):
3333 if (
34- entry .name == "onefuzz1_subscription "
34+ entry .name == "onefuzz1-subscription "
3535 and entry .type == "Microsoft.EventGrid/eventSubscriptions"
3636 and entry .event_delivery_schema == "EventGridSchema"
3737 and entry .destination .endpoint_type == "StorageQueue"
You can’t perform that action at this time.
0 commit comments