Hello @Anurag Anand
Yes, Azure Functions can access Azure Storage accounts via managed identity in sovereign clouds. However, the steps to configure this may differ slightly from the steps in the document you mentioned, depending on the specific sovereign cloud you are using.
Here are the general steps to configure a function app to access a storage account via managed identity in any sovereign cloud:
- Enable a managed identity for your function app. You can do this by following the instructions in the Azure documentation.
- Assign the managed identity the necessary permissions to access the storage account. You can do this by following the instructions in the Azure documentation.
- In your function app, remove any connection strings or secrets related to the storage account.
- Add the following environment variables to your function app's configuration:
-
AzureWebJobsStorage__blobServiceUri
: The URI of the blob service endpoint for your storage account. -
AzureWebJobsStorage__queueServiceUri
: The URI of the queue service endpoint for your storage account. -
AzureWebJobsStorage__tableServiceUri
: The URI of the table service endpoint for your storage account.
For example, if your storage account name is mystorageaccount
and you are using the Mooncake sovereign cloud, the environment variables would be:
-
AzureWebJobsStorage__blobServiceUri
:[https://mystorageaccount.blob.core.chinacloudapi.cn/
]() -
AzureWebJobsStorage__queueServiceUri
:[https://mystorageaccount.queue.core.chinacloudapi.cn/
]() -
AzureWebJobsStorage__tableServiceUri
:[https://mystorageaccount.table.core.chinacloudapi.cn/
]()
Note that the endpoints for each sovereign cloud may differ slightly, so be sure to use the correct endpoints for your cloud. This should get you started.