Skip to content

Commit 2ddc6ec

Browse files
committed
Update Azure Functions tutorials to include Key Vault for secure storage account key management
1 parent b1f45d0 commit 2ddc6ec

3 files changed

Lines changed: 16 additions & 6 deletions

File tree

articles/azure-functions/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
href: tutorial-ffmpeg-processing-azure-files.md
165165
- name: Durable text analysis on a mounted share
166166
displayName: Azure Files, storage mount, Durable Functions, Flex Consumption
167-
href: durable/tutorial-durable-text-analysis-azure-files.md
167+
href: durable/tutorial-durable-text-analysis-azure-files.md?toc=/azure/azure-functions/toc.json&bc=/azure/azure-functions/breadcrumb/toc.json
168168
- name: Java with Azure Cosmos DB and Event Hubs
169169
href: functions-event-hub-cosmos-db.md
170170
- name: Samples

articles/azure-functions/durable/tutorial-durable-text-analysis-azure-files.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,14 @@ This sample is an [Azure Developer CLI (azd)](/azure/developer/azure-developer-c
7575

7676
When prompted, select the Azure subscription and location to use. The command then:
7777

78-
- Creates a resource group, storage account, Flex Consumption function app with a Durable Functions configuration, Application Insights instance, and managed identity
78+
- Creates a resource group, storage account, Key Vault, Flex Consumption function app with a Durable Functions configuration, Application Insights instance, and managed identity
7979
- Deploys the Python function code
8080
- Uploads sample text files to the Azure Files share
8181
- Runs a health check
8282

83+
> [!NOTE]
84+
> Because Azure Files SMB mounts don't yet support managed identity authentication, a storage account key is required. As a best practice, the deployment stores this key in [Azure Key Vault](/azure/key-vault/general/overview) and uses a [Key Vault reference](/azure/app-service/app-service-key-vault-references) so the key is never exposed in app settings. This approach provides centralized secret management, auditing, and support for key rotation.
85+
8386
The deployment takes a few minutes. When it completes, you see a summary of the created resources.
8487
8588
1. Save resource names as shell variables for the remaining steps:

articles/azure-functions/tutorial-ffmpeg-processing-azure-files.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,17 @@ The three key pieces that make OS mount–based processing work are the infrastr
6161

6262
### Mount configuration (Bicep)
6363

64-
The `mounts.bicep` module configures an Azure Files SMB mount on the function app. The `mountPath` value determines the local path where files appear at runtime:
64+
The `mounts.bicep` module configures an Azure Files SMB mount on the function app. The `mountPath` value determines the local path where files appear at runtime. The storage account access key is passed in as a parameter that the platform resolves at runtime via a Key Vault reference:
6565

6666
:::code language="bicep" source="~/functions-flex-azure-files-samples/ffmpeg-image-processing/infra/app/mounts.bicep" :::
6767

68-
The mount is invoked from `main.bicep` with the share name and path:
68+
Because Azure Files SMB mounts don't yet support managed identity authentication, a storage account key is required. As a best practice, the deployment stores this key in Azure Key Vault and uses a [Key Vault reference](/azure/app-service/app-service-key-vault-references) in an app setting. The mount configuration references that app setting with `@AppSettingRef()`, so the key is never exposed in your Bicep templates. The `keyvault.bicep` module creates the vault, stores the key, and grants RBAC roles:
6969
70-
:::code language="bicep" source="~/functions-flex-azure-files-samples/ffmpeg-image-processing/infra/main.bicep" range="194-212" :::
70+
:::code language="bicep" source="~/functions-flex-azure-files-samples/ffmpeg-image-processing/infra/app/keyvault.bicep" :::
71+
72+
The mount and Key Vault modules are invoked from `main.bicep`:
73+
74+
:::code language="bicep" source="~/functions-flex-azure-files-samples/ffmpeg-image-processing/infra/main.bicep" range="195-229" :::
7175
7276
### Post-deployment script
7377
@@ -100,12 +104,15 @@ This sample is an [Azure Developer CLI (azd)](/azure/developer/azure-developer-c
100104

101105
When prompted, select the Azure subscription and location to use. The command then:
102106

103-
- Creates a resource group, storage account, Flex Consumption function app, Application Insights instance, and managed identity.
107+
- Creates a resource group, storage account, Key Vault, Flex Consumption function app, Application Insights instance, and managed identity.
104108
- Deploys the Python function code.
105109
- Downloads and uploads the ffmpeg binary to the Azure Files share.
106110
- Creates an EventGrid subscription so blob uploads trigger your function.
107111
- Runs a health check.
108112

113+
> [!NOTE]
114+
> Because Azure Files SMB mounts don't yet support managed identity authentication, a storage account key is required. As a best practice, the deployment stores this key in [Azure Key Vault](/azure/key-vault/general/overview) and uses a [Key Vault reference](/azure/app-service/app-service-key-vault-references) so the key is never exposed in app settings. This approach provides centralized secret management, auditing, and support for key rotation.
115+
109116
The deployment takes a few minutes. When it completes, you see a summary of the created resources.
110117
111118
1. Save resource names as shell variables for the remaining steps:

0 commit comments

Comments
 (0)