I'm following the instructions here to add a --deadletter-endpoint
to an existing EventGrid subscription.
The process is failing with error: Event subscription doesn't exist.
What am I missing?:
- Azure Cloud Shell
- Commands executed:
containername=eg-dead-letter-events //container where deadlettered events will be stored
topicid=$(az eventgrid system-topic show --name egtop-dev -g TEST_DEV --query id --output tsv) //name of eventgrid system topic
storageid=$(az storage account show --name stgdev --resource-group TEST_DEV --query id --output tsv) //name of storage account where deadlettered events will be stored
az eventgrid event-subscription update \
--name egsub-dev \ //name of Event Subscription here? also tried System Topic name, no go.
--source-resource-id $topicid \ //I cannot find a clear reference for what is supposed to go here
--deadletter-endpoint $storageid/blobServices/default/containers/$containername
- Results:
Event subscription doesn't exist.
Edit 1: Made some progress
- This command helped list out the needed pieces:
az eventgrid event-subscription list --topic-type "Microsoft.Storage.StorageAccounts" --location southcentralus
- Hardcoded values found in the above response as:
az eventgrid event-subscription update --name egsub-dev --source-resource-id /subscriptions/$subscription/resourceGroups/$resourceGroup/providers/Microsoft.Storage/storageAccounts/storageAccountThatTriggersEventGrid/providers/Microsoft.EventGrid/eventSubscriptions/egsub-dev --deadletter-endpoint $storageid/blobServices/default/containers/$containername
- But this results in a different error:
No registered resource provider found for location 'southcentralus' and API version '2020-10-15-preview' for type 'storageAccounts'. The supported api-versions are '2021-04-01, 2021-02-01, 2021-01-01, 2020-08-01-preview, 2019-06-01, 2019-04-01, 2018-11-01, 2018-07-01, 2018-03-01-preview, 2018-02-01, 2017-10-01, 2017-06-01, 2016-12-01, 2016-05-01, 2016-01-01, 2015-06-15, 2015-05-01-preview'. The supported locations are 'eastus, eastus2, westus, westeurope, eastasia, southeastasia, japaneast, japanwest, northcentralus, southcentralus, centralus, northeurope, brazilsouth, australiaeast, australiasoutheast, southindia, centralindia, westindia, canadaeast, canadacentral, westus2, westcentralus, uksouth, ukwest, koreacentral, koreasouth, francecentral, australiacentral, southafricanorth, uaenorth, switzerlandnorth, germanywestcentral, norwayeast, westus3, jioindiawest'.
Thoughts on this one?