Skip to content

AviatrixSystems/terraform-aviatrix-azure-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Launch an Aviatrix Controller in Azure

Description

These Terraform modules launch an Aviatrix Controller in Azure and create an access account on the controller.

Prerequisites

  1. Terraform v0.13+ - execute terraform files
  2. Python3 - execute accept_license.py and aviatrix_controller_init.py python scripts

Providers

Name Version
azuread ~> 2.0
azurerm >= 2.0
null >= 2.0

Available Modules

Module Description
aviatrix_controller_azure Creates Azure Active Directory Application and Service Principal for Aviatrix access account setup
aviatrix_controller_build Builds the Aviatrix Controller VM on Azure
aviatrix_controller_initialize Initializes the Aviatrix Controller (setting admin email, setting admin password, upgrading controller version, and setting up access account)

Procedures for Building and Initializing a Controller in Azure

1. Create the Python virtual environment and install required dependencies

Create the virtual environment.

 python3 -m venv venv

Activate the virtual environment.

 source venv/bin/activate

Install required dependencies.

 pip install -r requirements.txt

2. Authenticating to Azure

Please refer to the documentation for the azurerm and azuread Terraform providers to decide how to authenticate to Azure.

3. Applying Terraform configuration

Build and initialize the Aviatrix Controller

terraform {
  required_providers {
    azurerm = {
      source = "hashicorp/azurerm"
    }
    azuread = {
      source = "hashicorp/azuread"
    }
  }
}

module "aviatrix_controller_azure" {
   source                        = "AviatrixSystems/azure-controller/aviatrix"
   controller_name               = "<<< your Aviatrix Controller name >>>"
   // Example incoming_ssl_cidr list: ["1.1.1.1/32","10.10.0.0/16"]
   incoming_ssl_cidr             = ["<<trusted management cidrs>>"]
   avx_controller_admin_email    = "<<< your admin email address for the Aviatrix Controller>>>"
   avx_controller_admin_password = "<<< your admin password for the Aviatrix Controller>>>"
   account_email                 = "<< your email address for your access account >>"
   access_account_name           = "<< your account name mapping to your Azure account >>"
   aviatrix_customer_id          = "<< your customer license id >>"
}

Execute

terraform init
terraform apply