◷ Reading Time: 6 minutes
Deploying an Azure Function requires the following parameters. The values are to be found in your Azure account.
Therefore, as you go with each step, copy the values in Package Builder‘s Deployment section.
- Open any project in FlexRule Designer.
- Click on Package Builder
- Go to Deployment section and select Azure Function as the Destination.
- Copy the values to configuration fields explained in each item under Steps to Retrieve Values Required for Deployment.
- Click on the Save button to save the configuration as a JSON that can be used for deployment.
- At the end of the steps, you should have a JSON file similar to the following file with your deployment data.
You can simply load this file to deploy as an Azure Function.
Steps to Retrieve Values Required for Deployment
Log in to your Azure account, if you are new you can create an account by using this link.
Click the navigation icon, and then select Azure Active Directory in the left sidebar.
Click App Registrations.
Select the application you want to use. You may need to create it if you don’t have one yet.
This is the ClientId.
To retrieve the ClientSecret, create a Client Secret in your app (if you don’t have one yet).
The ClientSecret is the Value, not the Secret ID.
To retrieve your SubscriptionId, navigate to Home page and select Subscriptions.
Copy the Subscription ID for the applicable subscription.
Navigate to your subscription, select Access control (IAM), then select Add role assignment.
Select Contributor role and assign it to your application.
From the same subscription page, navigate to Resource providers and then search Microsoft.Storage. Register if it is not yet.
Also, register Microsoft.web, if it is not registered.
If you go to the overview of the app, you can find the TenantId.
Region and ResourceGroup
Search for Resource Groups.
If you don’t have a resource group, create one. Its name is ResourceGroup.
Its location is the Region.
For new accounts, deploying for the first time sometimes leads to a “Conflict” error.
This is an Azure issue and can be resolved by creating an App Service Plan.
In the search bar, search for App Service Plans.
Create an App Service plan and provide details.
Delete it right after successfully creating the app service plan, then try deploying again using the FRD.