Skip to content

Commit 26cd89c

Browse files
authored
Merge pull request #312440 from ggailey777/scripts-curation
[Functions] Azure CLI scripts article curation
2 parents 12a15d9 + c243c0b commit 26cd89c

17 files changed

Lines changed: 66 additions & 446 deletions

articles/azure-functions/TOC.yml

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -180,31 +180,7 @@
180180
- name: TypeScript
181181
href: /samples/browse/?products=azure-functions&languages=typescript
182182
- name: Azure CLI
183-
items:
184-
- name: CLI sample index
185-
href: functions-cli-samples.md
186-
- name: Create function app
187-
items:
188-
- name: Serverless function app
189-
href: ./scripts/functions-cli-create-serverless.md
190-
- name: Serverless Python app
191-
href: ./scripts/functions-cli-create-serverless-python.md
192-
- name: Scalable Premium plan app
193-
href: ./scripts/functions-cli-create-premium-plan.md
194-
- name: Dedicated (App Service) plan app
195-
href: ./scripts/functions-cli-create-app-service-plan.md
196-
- name: Integrate services
197-
items:
198-
- name: Connect Azure Storage
199-
href: ./scripts/functions-cli-create-function-app-connect-to-storage-account.md
200-
- name: Connect Azure Cosmos DB
201-
href: ./scripts/functions-cli-create-function-app-connect-to-cosmos-db.md
202-
- name: Python mount Files share
203-
href: ./scripts/functions-cli-mount-files-storage-linux.md
204-
- name: Continuous deployment
205-
items:
206-
- name: GitHub deployment
207-
href: ./scripts/functions-cli-create-function-app-github-continuous.md
183+
href: functions-cli-samples.md
208184
- name: Azure PowerShell
209185
href: create-resources-azure-powershell.md
210186
- name: Concepts
@@ -393,7 +369,7 @@
393369
href: functions-create-function-app-portal.md
394370
- name: Azure CLI
395371
displayName: create function app
396-
href: ./scripts/functions-cli-create-serverless.md
372+
href: how-to-create-function-azure-cli.md
397373
- name: Create functions
398374
items:
399375
- name: HTTP trigger
@@ -402,10 +378,6 @@
402378
href: functions-create-http-endpoint.md
403379
- name: Kotlin using IntelliJ
404380
href: functions-create-maven-kotlin-intellij.md
405-
- name: Consumption plan
406-
href: ./scripts/functions-cli-create-app-service-plan.md
407-
- name: Premium plan
408-
href: ./scripts/functions-cli-create-premium-plan.md
409381
- name: Linux container (Premium)
410382
displayName: container, Docker, custom
411383
href: functions-deploy-container.md

articles/azure-functions/consumption-plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ In Consumption plan hosting, each function app typically runs in its own plan. I
3333

3434
Use the following links to learn how to create a serverless function app in a Consumption plan, either programmatically or in the Azure portal:
3535

36-
- [Azure CLI](./scripts/functions-cli-create-serverless.md)
36+
- [Azure CLI](functions-cli-samples.md#create)
3737
- [Azure portal](./functions-get-started.md)
3838
- [Azure Resource Manager template](functions-create-first-function-resource-manager.md)
3939

articles/azure-functions/functions-cli-samples.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ title: Azure CLI samples for Azure Functions
33
description: Find links to bash scripts for Azure Functions that use the Azure CLI. Learn how to create a function app that allows integration and deployment.
44
ms.assetid: 577d2f13-de4d-40d2-9dfc-86ecc79f3ab0
55
ms.topic: sample
6-
ms.date: 04/21/2024
6+
ms.date: 02/27/2026
77
ms.custom: mvc, devx-track-azurecli, seo-azure-cli
88
keywords: functions, azure cli samples, azure cli examples, azure cli code samples
99
---
1010

1111
# Azure CLI Samples
1212

13-
These end-to-end Azure CLI scripts are provided to help you learn how to provision and managing the Azure resources required by Azure Functions. You must use the [Azure Functions Core Tools](functions-run-local.md) to create actual Azure Functions code projects from the command line on your local computer and deploy code to these Azure resources. For a complete end-to-end example of developing and deploying from the command line using both Core Tools and the Azure CLI, see one of these language-specific command line quickstarts:
13+
These end-to-end Azure CLI scripts are provided to help you learn how to provision and manage the Azure resources required by Azure Functions. You must use the [Azure Functions Core Tools](functions-run-local.md) to create actual Azure Functions code projects from the command line on your local computer and deploy code to these Azure resources. For a complete end-to-end example of developing and deploying from the command line using both Core Tools and the Azure CLI, see one of these language-specific command line quickstarts:
1414

1515
+ [C#](how-to-create-function-azure-cli.md?pivots=programming-language-csharp)
1616
+ [Java](how-to-create-function-azure-cli.md?pivots=programming-language-java)
@@ -19,23 +19,24 @@ These end-to-end Azure CLI scripts are provided to help you learn how to provisi
1919
+ [Python](how-to-create-function-azure-cli.md?pivots=programming-language-python)
2020
+ [TypeScript](how-to-create-function-azure-cli.md?pivots=programming-language-typescript)
2121

22-
The following table includes links to bash scripts that you can use to create and manage the Azure resources required by Azure Functions using the Azure CLI.
22+
The following table includes links to bash scripts that you can use to create and manage the Azure resources required by Azure Functions using the Azure CLI. These scripts are maintained in the [Azure-Samples/azure-cli-samples](https://github.com/Azure-Samples/azure-cli-samples/tree/master/azure-functions) GitHub repository.
2323

2424
<a id="create"></a>
2525

2626
| Create app | Description |
2727
|---|---|
28-
| [Create a function app for serverless execution](scripts/functions-cli-create-serverless.md) | Create a function app in a Consumption plan. |
29-
| [Create a serverless Python function app](scripts/functions-cli-create-serverless-python.md) | Create a Python function app in a Consumption plan. |
30-
| [Create a function app in a scalable Premium plan](scripts/functions-cli-create-premium-plan.md) | Create a function app in a Premium plan. |
31-
| [Create a function app in a dedicated (App Service) plan](scripts/functions-cli-create-app-service-plan.md) | Create a function app in a dedicated App Service plan. |
28+
| [create-function-app-flex-consumption.sh](https://github.com/Azure-Samples/azure-cli-samples/tree/master/azure-functions/create-function-app-flex-consumption) | Creates a function app in a Flex Consumption plan with a user-assigned managed identity. **This is the recommended serverless hosting plan.** |
29+
| [create-function-app-consumption.sh](https://github.com/Azure-Samples/azure-cli-samples/tree/master/azure-functions/create-function-app-consumption) | Creates a function app in a Consumption plan. |
30+
| [create-function-app-premium-plan.sh](https://github.com/Azure-Samples/azure-cli-samples/tree/master/azure-functions/create-function-app-premium-plan) | Creates a function app in a Premium (Elastic Premium) plan. |
31+
| [create-function-app-app-service-plan.sh](https://github.com/Azure-Samples/azure-cli-samples/tree/master/azure-functions/create-function-app-app-service-plan) | Creates a function app in a dedicated App Service plan. |
3232

33-
| Integrate | Description|
33+
| Connect to services | Description|
3434
|---|---|
35-
| [Create a function app and connect to a storage account](scripts/functions-cli-create-function-app-connect-to-storage-account.md) | Create a function app and connect it to a storage account. |
36-
| [Create a function app and connect to an Azure Cosmos DB](scripts/functions-cli-create-function-app-connect-to-cosmos-db.md) | Create a function app and connect it to an Azure Cosmos DB instance. |
37-
| [Create a Python function app and mount an Azure Files share](scripts/functions-cli-mount-files-storage-linux.md) | By mounting a share to your Linux function app, you can leverage existing machine learning models or other data in your functions. |
35+
| [create-function-app-connect-to-storage-account.sh](https://github.com/Azure-Samples/azure-cli-samples/tree/master/azure-functions/create-function-app-connect-to-storage) | Creates a function app in a Flex Consumption plan and connects it to a storage account using managed identity. |
36+
| [create-function-app-connect-to-cosmos-db.sh](https://github.com/Azure-Samples/azure-cli-samples/tree/master/azure-functions/create-function-app-connect-to-cosmos-db) | Creates a function app in a Flex Consumption plan and connects it to Azure Cosmos DB using managed identity and RBAC. |
37+
| [connect-azure-openai-resources.sh](https://github.com/Azure-Samples/azure-cli-samples/tree/master/azure-functions/connect-azure-openai-resources) | Creates a function app in a Flex Consumption plan and connects it to Azure OpenAI using managed identity. |
38+
| [functions-cli-mount-files-storage-linux.sh](https://github.com/Azure-Samples/azure-cli-samples/tree/master/azure-functions/functions-cli-mount-files-storage-linux) | Creates a Linux function app and mounts an Azure Files share, which lets you leverage existing data or machine learning models in your functions. |
3839

39-
| Continuous deployment | Description|
40+
| Deploy code | Description|
4041
|---|---|
41-
| [Deploy from GitHub](scripts/functions-cli-create-function-app-github-continuous.md) | Create a function app that deploys from a GitHub repository. |
42+
| [deploy-function-app-with-function-github-continuous.sh](https://github.com/Azure-Samples/azure-cli-samples/tree/master/azure-functions/deploy-function-app-with-function-github-continuous) | Creates a function app in a Consumption plan and deploys code from a public GitHub repository. |

articles/azure-functions/functions-machine-learning-tensorflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ To modify the `classify` function to classify an image based on its contents, yo
134134
To build your own model using the free tier of the Custom Vision Service, follow the instructions in the [sample project repository](https://github.com/Azure-Samples/functions-python-tensorflow-tutorial/blob/master/train-custom-vision-model.md).
135135
136136
> [!TIP]
137-
> If you want to host your TensorFlow model independent of the function app, you can instead mount a file share containing your model to your Linux function app. To learn more, see [Mount a file share to a Python function app using Azure CLI](./scripts/functions-cli-mount-files-storage-linux.md).
137+
> If you want to host your TensorFlow model independent of the function app, you can instead mount a file share containing your model to your Linux function app. To learn more, see [Mount file shares](storage-considerations.md#mount-file-shares).
138138
139139
1. In the *start* folder, run following command to copy the model files into the *classify* folder. Be sure to include `\*` in the command.
140140
@@ -295,4 +295,4 @@ See also:
295295
296296
- [Deploy the function to Azure using Visual Studio Code](https://code.visualstudio.com/docs/python/tutorial-azure-functions).
297297
- [Azure Functions Python Developer Guide](./functions-reference-python.md)
298-
- [Mount a file share to a Python function app using Azure CLI](./scripts/functions-cli-mount-files-storage-linux.md)
298+
- [Azure CLI: Mount a file share to a Python function app](https://github.com/Azure-Samples/azure-cli-samples/tree/master/azure-functions/functions-cli-mount-files-storage-linux)

articles/azure-functions/functions-premium-plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ When you create a function app in the Azure portal, the Consumption plan is the
3939

4040
The following articles show you how to programmatically create a function app with a Premium plan:
4141

42-
+ [Azure CLI](scripts/functions-cli-create-premium-plan.md)
42+
+ [Azure CLI](functions-cli-samples.md#create)
4343
+ [Azure Resource Manager template](functions-infrastructure-as-code.md?pivots=premium-plan)
4444

4545
## Eliminate cold starts

articles/azure-functions/functions-reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ When the function app and any other required resources don't already exist in Az
104104
::: zone-end
105105
+ Using [Visual Studio Code](./functions-develop-vs-code.md#publish-to-azure)
106106

107-
+ Programmatically using [Azure CLI](./scripts/functions-cli-create-serverless.md), [Azure PowerShell](./create-resources-azure-powershell.md#create-a-serverless-function-app-for-c), [ARM templates](functions-create-first-function-resource-manager.md), or [Bicep files](functions-create-first-function-bicep.md)
107+
+ Programmatically using [Azure CLI](functions-cli-samples.md#create), [Azure PowerShell](./create-resources-azure-powershell.md#create-a-serverless-function-app-for-c), [ARM templates](functions-create-first-function-resource-manager.md), or [Bicep files](functions-create-first-function-bicep.md)
108108

109109
+ In the [Azure portal](functions-create-function-app-portal.md)
110110

@@ -346,7 +346,7 @@ If you're configuring `AzureWebJobsStorage` using a storage account that uses th
346346

347347
#### Connecting to a resource in another tenant
348348

349-
If your function needs to connect to a resource in a different Microsoft Entra tenant, your connection needs to use a _federated identity credential_. This requires a user-assigned managed identity and a multi-tenant Entra ID app registration. You cannot use a system-assigned managed identity for cross-tenant connections.
349+
If your function needs to connect to a resource in a different Microsoft Entra tenant, your connection needs to use a _federated identity credential_. This requires a user-assigned managed identity and a multitenant Entra ID app registration. You cannot use a system-assigned managed identity for cross-tenant connections.
350350

351351
> [!IMPORTANT]
352352
> When you configure a trigger for a cross-tenant connection in the Consumption or Flex Consumption plan types, the platform no longer scales the function app based on that trigger.
@@ -355,7 +355,7 @@ To configure a cross-tenant identity-based connection, you first need to set up
355355

356356
1. In the tenant where your function app is deployed, [create a new user-assigned managed identity](/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities#create-a-user-assigned-managed-identity).
357357
1. [Assign that identity](../app-service/overview-managed-identity.md?toc=%2Fazure%2Fazure-functions%2Ftoc.json#add-a-user-assigned-identity) to the function app.
358-
1. In the same tenant, [create a multi-tenant Entra app registration](/entra/workload-id/workload-identity-federation-config-app-trust-managed-identity#configure-a-multi-tenant-app-registration) that represents the cross-tenant resource you want to access.
358+
1. In the same tenant, [create a multitenant Entra app registration](/entra/workload-id/workload-identity-federation-config-app-trust-managed-identity#configure-a-multi-tenant-app-registration) that represents the cross-tenant resource you want to access.
359359
1. [Add the managed identity as a federated identity credential for the app registration.](/entra/workload-id/workload-identity-federation-config-app-trust-managed-identity)
360360
1. In the tenant where the resource is deployed, [create an enterprise application for the app registration](/entra/identity/enterprise-apps/create-service-principal-cross-tenant).
361361
1. Assign permissions for the enterprise application to access the resource.

articles/azure-functions/functions-run-local.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ The following considerations apply to this kind of deployment:
403403

404404
+ Publishing overwrites existing files in the remote function app deployment.
405405

406-
+ You must have already [created a function app in your Azure subscription](functions-cli-samples.md#create). Core Tools deploys your project code to this function app resource. To learn how to create a function app from the command prompt or terminal window using the Azure CLI or Azure PowerShell, see [Create a Function App for serverless execution](./scripts/functions-cli-create-serverless.md). You can also [create these resources in the Azure portal](./functions-create-function-app-portal.md#create-a-function-app). You get an error when you try to publish to a `<FunctionAppName>` that doesn't exist in your subscription.
406+
+ You must have already [created a function app in your Azure subscription](functions-cli-samples.md#create). Core Tools deploys your project code to this function app resource. To learn how to create a function app from the command prompt or terminal window using the Azure CLI or Azure PowerShell, see [Azure CLI Samples](functions-cli-samples.md#create). You can also [create these resources in the Azure portal](./functions-create-function-app-portal.md#create-a-function-app). You get an error when you try to publish to a `<FunctionAppName>` that doesn't exist in your subscription.
407407

408408
+ A project folder may contain language-specific files and directories that shouldn't be published. Excluded items are listed in a .funcignore file in the root project folder.
409409

articles/azure-functions/scripts/functions-cli-create-app-service-plan.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)