This sample is a work in progress. Work remaining:
- Automate import of function app into API Management.
- Update logic app definition to use API Management action instead of function app action.
- Update readme.md with relevant information about the sample. Most of the content will be the same as the function app sample.
Differences are:
- Automate the function app's import.
- Secure the function app from traffic not routed through API Management.
- Install Azure PowerShell 2.4.0 on your platform.
- Install Azure Functions Core Tools on your platform.
TODO: Add content here
To set up, deploy, and run this sample, you can use the command line or set up an Azure DevOps pipeline.
-
Clone or download this sample repository.
-
Sign in to Azure by running this command from any command line tool that you want.
Connect-AzAccount
-
To target your deployment, select the appropriate Azure context to use.
-
To push a full deployment for this sample to Azure, run this command from the PowerShell directory that contains this sample:
./full-deploy.ps1 -groupId <groupId> -environment <environment> -location <regionName>
This sample uses multi-stage YAML pipelines. To set up the sample pipeline, follow these steps:
-
Make sure that the multi-stage pipeline preview feature is enabled.
-
Clone or fork the samples repository into your own repository.
-
Choose one of these steps:
-
Create an Azure Resource Manager service connection that has the name "Azure Samples Subscription" in your project that points to the Azure subscription that you want to use for deployment.
-
Edit all instances of
azureSubscription: 'Azure Samples Subscription'
in the./powershell/azure-pipelines.yml
file by using the name for an existing Azure Resource Manager service connection in your project.
[!NOTE] To use the Azure Resource Manager service connection, make sure that the connection has selected the Allow all pipelines to use this connection checkbox. Otherwise, you must authorize the pipeline that you create in the next step.
-
-
Update these
./pipeline/azure-pipelines.yml
variables:-
groupId
: A value that's unique to you or your organization and is used to start the names for all resources and resource groups that are created -
location
: The name for the Azure region where you want to deploy the resources -
abbrevLocationName
: The abbreviated region name that's used in resource names
-
-
Create a new pipeline in your project that uses the
./powershell/azure-pipelines.yml
file from this sample.
To learn more about the different parts in these samples, review these topics:
-
Concepts introduces the main concepts that underlie these samples.
-
Naming convention describes the naming convention to use when creating the resources in these samples.
-
Samples file structure and definitions explains the purpose for each file in these samples.
-
Scaling expands on the reasons why these samples provide the capability to scale by increasing the number of copies for the logic apps deployed and organizing resources into separate resource groups.
This sample creates these resources:
TODO: add API management resource to the diagram
To learn about the scripts in this sample and how they work, review Samples file structure and definitions.
TODO: Update descriptions to include the API management bits.
This sample also implements these template and definition files:
File name | Description |
---|---|
shared-template.json |
This template deploys the Azure function app and all its dependent resources. The |
connectors-template.json |
This template provides the parameters to inject into the logic app definition but doesn't actually deploy anything. This approach is consistent with the method for injecting parameters into a logic app across the other samples. |
logic-app-template.json |
This template creates a shell for a logic app definition, which is blank to support separating the template from the definition. |
logic-app-definition.json |
This file defines a basic logic app that uses a timer as a trigger and calls the provided AwesomeFunction each time that the logic app gets triggered. |
When you're done with the sample, delete the resource groups that were created by the sample. To remove all the resource groups with names that start with a specific groupId
value, run this command from the PowerShell directory that contains this sample:
./clean-up.ps1 -groupId <groupId>