1. Home
  2. FlexRule Designer
  3. Publishing a Project
  4. Deployment Options
  5. Deploy as an Azure Function
  6. How to Setup and Retrieve Deployment Configurations for Azure Function

How to Setup and Retrieve Deployment Configurations for Azure Function

◷ Reading Time: 6 minutes

Deploying an Azure Function requires the following parameters. The values are to be found in your Azure account.

  • ClientId
  • ClientSecret
  • SubscriptionId
  • TenantId
  • Region
  • ResourceGroup

Therefore, as you go with each step, copy the values in Package Builder‘s Deployment section.

  1. Open any project in FlexRule Designer.
  2. Click on Package Builder
  3. Go to Deployment section and select Azure Function as the Destination.

    AzureDeploymentWindow
  4. Copy the values to configuration fields explained in each item under Steps to Retrieve Values Required for Deployment.
  5. Click on the Save button to save the configuration as a JSON that can be used for deployment.

  6. 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

ClientId

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.

ClientSecret

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.

You can copy this value only after you create it.
Therefore, copy the value at this stage as you will not be able to retrieve it later.

SubscriptionId

To retrieve your SubscriptionId, navigate to Home page and select Subscriptions.

Copy the Subscription ID for the applicable subscription.

Make sure to assign a role to your application and enable Resource providers. If you haven’t done this yet, please follow the steps as stated below.

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.

TenantId

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.

Troubleshooting

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.

Updated on November 29, 2022

Was this article helpful?

Related Articles