This story will teach us how to deploy a Qualys Virtual Scanner Appliance in Azure using Terraform.
1. Requirements
To deploy a Qualys Virtual Scanner Appliance in Azure, we will need the following:
- Define the Azure Provider
- Create or use an existing Resource Group
- Create or use an existing VNET
- Create or use an existing Subnet
- Create an NSG (Network Security Group) and attach it to the subnet (we can also assign it to the Virtual Machine, but it is not recommended)
- Create a NIC (Network Card) in an existing Subnet
- Get the Publisher, Offer, and SKU of the operating system image
- Create the Virtual Machine
- Accept the Marketplace Terms for the Appliance
2. Prerequisites
Before creating our Azure Virtual Machine, we will need an Azure SPN (Service Principal) to execute our Terraform code (check step 1 of this story if you need help creating an SPN).
3. Defining the Azure Provider
First, we will define Azure authentication variables.