Azure VNET


This document explains the various types of required policies that grant permissions for users to create or modify resources as part of deploying F5® Distributed Cloud Sites on Azure. This document also provides instructions to create a service principal using the Azure cloud reference scripts.

Azure VNet Policies

In case of Azure VNet site deployments, it is required that you have the Owner role and create service principal subscription with Contributor role for it.

The following is the JSON view of the required policy and permissions to deploy Azure VNet site:

Azure VNet Site Permissions
    "properties": {
        "roleName": "\$ROLE_NAME",
        "description": "F5 XC Custom Role to create Azure VNET site",
        "assignableScopes": [
        "permissions": [
                "actions": [
                "notActions": [],
                "dataActions": [],
                "notDataActions": []

Create Role and Service Principal

Perform the following steps to create a role in Azure portal with required permissions to create Azure VNet site and then create service principal subscription with contributor role for it.

Step 1: Log into Azure portal and navigate to access control section.

Go to Home > Subscriptions. Change to your subscription for which you are owner and click Access Control IAM.

Step 2: Create a custom role with required permissions.

Change to Role assignments tab. Click Add and select Add custom role. Give a name in the Basics tab and click the JSON tab. Click Edit to add the permissions listed in the Azure VNet Policies chapter.

Step 3: Complete creating the role.

Click Review + create.

Step 4: Create the service principal account.

You can create service principal account using F5 Distributed Cloud Services Terraform tool or using Azure CLI.

Step 4.1: Install Azure CLI.

See Install the Azure CLI for information on Azure CLI installation and perform installation accordingly.

Step 4.2: Create service principal.

Enter the following commands to create service principal:

          az login
az account list --output table
az account set -s \$SUBSCRIPTION_ID
az ad sp create-for-rbac -n <deployment-name> --role="<custom-role>" --scopes="/subscriptions/\$SUBSCRIPTION_ID"

Note: Replace subscription_id with your Azure subscription ID and the <custom-role> with the custom role created in previous step.

Note: In case service principal creation failing with error message stating that you have not accepted the legal terms on this subscription, enter the following command to accept the terms and conditions: az vm image terms accept --urn "volterraedgeservices:volterra-node:volterra-node:0.7.1"

Create Service Principal Using Cloud Reference Script

The following video tutorial shows how to create an Azure role and apply to service account:

Perform the following steps:

Note: The Azure CLI is required. See Install the Azure CLI for more information.

Step 1: Run the Azure login command.
          az login

The CLI opens your default browser and load an Azure sign-in page. Sign-in with your account credentials.

Step 2: List the Azure accounts and subscriptions.
          az account list --output table

Get the desired Azure SubscriptionId from the output of above command.

Step 3: Set the active account to the subscription ID as per your choice.
          export SUBSCRIPTION_ID=<subscription_id>
az account set -s \$SUBSCRIPTION_ID
Step 4: Create the Azure custom role using the cloud reference script.

Download the script from the Azure Cloud Reference Script location in the JSON format. The name of the file is f5xc-azure-custom-role.json. Enter the following command:

          az role definition create --role-definition ./f5xc-azure-custom-role.json

Note: Replace the value of $SUBSCRIPTION_ID to the relevant SubscriptionId in the JSON file.

Step 5: Create the service principal and assign the custom role created in Step 4.
          az ad sp create-for-rbac --role="f5xc-azure-role" --scopes="/subscriptions/\$SUBSCRIPTION_ID" -n "SP_NAME"

The following is the list of field descriptions for the above command:

  • f5xc-azure-role is the custom role created in Step 4.
  • SP_NAME is the service principal name that will be created.

The resulting JSON output can be used to create Azure Client Secret for Service Principal on F5® Distributed Cloud Console. See Azure Cloud Credentials for more information.