Azure Account Credential Setup¶
Aviatrix Controller uses Azure APIs extensively to launch Aviatrix gateways, configure encrypted peering and other features.
In order to use Azure API, you need to first create an Aviatrix Access Account on the Aviatrix controller. This access account corresponds to a valid Azure subscription with API credentials. You need to create an access account for each subscription.
This document describes, for a given subscription, how to obtain the necessary information, specifically Application ID, Application Key (Client secret), and Application Directory ID to create an Aviatrix Access Account so that the Controller can execute APIs on that subscription. There are 3 sections, make sure you go through all of them.
2. API and Permission Setup¶
Setting up Azure permission for Aviatrix involves three main steps.
- Register Aviatrix Controller Application with Azure Active Directory
- Assign a role to the Aviatrix Controller Application
- Get Application ID, Application Key (Client secret) and Directory ID
Important: Complete the following steps in order.
2.1 – Register Aviatrix Controller Application¶
Login to the Azure Portal: https://portal.azure.com
- From the Azure portal click on “All services” and search for “Azure Active Directory” and click on “Azure Active Directory”.
- Click “App registrations”. Do not choose “App registrations (Legacy)”
- Click “+ New registration”
- Name = Aviatrix Controller
- Supported account types = Accounts in this organizational directory only
- Click Register.
2.2 – Assign a role to the Aviatrix Application¶
- Login to the Azure portal
- On the top left, click All services, search for “Subscriptions”
- Copy the Subscription ID (to notepad or a convenient location)
- Click on the Subscription ID
- Then select “Access control (IAM)”.
- Click Add and then select the “Contributor” role. If the “Contributor” role is too broad, you can later replace it with a custom role with specific permissions. Refer to Use Azure IAM Custom Role for instructions.
- In the Select search field, type in “Aviatrix”. The Aviatrix Controller (that you created in section 2.1) app should show up. Select this one and click Select towards to the bottom.
2.3 – Setup Information for Programmatic Sign in¶
From the Azure portal, click All services and search for “Azure Active Directory”. Click “App registrations” and then the application to see the Application (client) ID and Directory (tenant) ID.
Retrieve the Application (client) ID and Directory (tenant) ID.
- Copy the Application ID and Directory ID for later use.
Retrieve the Client Secrets.
- Click Certificates & secrets
- Click + New client secret
- Enter in the following, and then click Add
- Description = Aviatrix
- Expires = Never
- You should see the new secret as shown below.
- Copy the secret. This will be used as the Application Key in the Aviatrix Controller.
Add API permissions.
Go to Azure Active Directory -> select the “Aviatrix Controller” application, click into the application.
- Click API permissions
- Click “+Add a permission”
- Choose Azure Service Management
At this point you should have the following information to create an access account on Azure.
|Access Account Setup Input Field||Value|
|Subscription ID||From section 2.2|
|Directory ID||From section 2.3|
|Application ID||From section 2.3|
|Application Key (Client Secret)||From section 2.3|
If you need additional information, refer to How to: Use the portal to create an Azure AD application and service principal that can access resources on Azure documentation.
Azure China notes¶
Deploying the Aviatrix Gateway in the Azure China Cloud¶
- You must already have a Microsoft Azure China account and Aviatrix Controller in AWS China to deploy an Aviatrix Gateway in the Azure China Cloud.
- If you have not created a storage account in your Microsoft Azure cloud, create a storage account first.
- Create the Aviatrix Controller in your AWS China Cloud. Go to Onboarding and select Azure China.
- Enter the Aviatrix Customer ID.
- Enter the Certificate Domain.
- Create the Primary Access Account.
- Download the Aviatrix gateway image to your Microsoft Azure China storage account in a specified region. If the storage account does not exist, go to Azure China portal to create one first. Note: The download may take up to 20 minutes due to Azure infrastructure limitations.
- Deploy Aviatrix gateway in Gateway page or Multi-Cloud Transit Solution page.
For more information, see “What is a China ICP License?”