Azure / Azure/azure-cli

Use managed identity to command creates an event subscription for an event grid system topic

Open
#26,910 7 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad Auto-Assign customer-reported Event Grid feature-request Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Related command**
This is possible to use Managed Identity for custom topics like [this](https://learn.microsoft.com/en-us/azure/event-grid/managed-service-identity#create-an-event-subscription-by-using-a-managed-identity-for-delivery)

```
storageid=$(az storage account show --name demoStorage --resource-group gridResourceGroup --query id --output tsv)
deadletterendpoint="$storageid/blobServices/default/containers/"

az eventgrid event-subscription create
--source-resource-id /subscriptions/$subid/resourceGroups/$rg/providers/Microsoft.EventGrid/topics/$topicname
--delivery-identity-endpoint-type servicebusqueue
--delivery-identity systemassigned
--delivery-identity-endpoint $queueid
--deadletter-identity-endpoint $deadletterendpoint
--deadletter-identity systemassigned
-n $sb_esnameq
```

But based on [the documentation](https://learn.microsoft.com/pl-pl/cli/azure/eventgrid/system-topic/event-subscription?view=azure-cli-latest#az-eventgrid-system-topic-event-subscription-create) this is not possible for system topics.

```
az eventgrid system-topic event-subscription create --name
--resource-group
--system-topic-name
[--aad-tenant-id]
[--advanced-filter]
[--azure-active-directory-application-id-or-uri]
[--deadletter-endpoint]
[--delivery-attribute-mapping]
[--enable-advanced-filtering-on-arrays {false, true}]
[--endpoint]
[--endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
[--event-delivery-schema {cloudeventschemav1_0, custominputschema, eventgridschema}]
[--event-ttl]
[--expiration-date]
[--included-event-types]
[--labels]
[--max-delivery-attempts]
[--max-events-per-batch]
[--preferred-batch-size-in-kilobytes]
[--qttl]
[--subject-begins-with]
[--subject-case-sensitive {false, true}]
[--subject-ends-with]
```

**Is your feature request related to a problem? Please describe.**
This is not possible to use managed identity for system topics.

**Describe the solution you'd like**
I would like to have parameters like

```
--delivery-identity-endpoint-type servicebusqueue
--delivery-identity systemassigned
--delivery-identity-endpoint $queueid
--deadletter-identity-endpoint $deadletterendpoint
--deadletter-identity systemassigned
```

for system topics.

**Describe alternatives you've considered**
NA

**Additional context**
NA

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.