Overview
Terraform is Infrastructure as Code (IaC) software by HashiCorp that allows you to manage infrastructure across many cloud providers throughout the deployment, operations/management, retirement lifecycle. Beginning with NIOS 8.5, Infoblox has integrated IPAM and DNS automation with Terraform, using the Infoblox IPAM Plugin for Terraform.
Infoblox IPAM Provider
The Infoblox IPAM plugin is now a partner provider for Terraform. This means you no longer have to build the binary and add it manually. The provider will be automatically loaded when running terraform init by including the Infoblox provider block or an Infoblox resource in your configuration file.
You can integrate the Infoblox provider for Terraform with cloud providers such as Azure and VMware. The provider includes seven resources to bring IPAM and DNS automation into your IaC:
- infoblox_a_record: This resource creates an A record in an existing DNS zone.
- infoblox_cname_record: This resource creates a CNAME record in an existing DNS zone.
- infoblox_ip_allocation: This resource reserves the next available IP address in a specified network. This resource can also be used to create a Host record in an existing DNS zone.
- infoblox_ip_association: This resource updates the properties for an IP address in NIOS, such as adding a MAC address.
- infoblox_network: This resource creates a network in the Infoblox Grid.
- infoblox_network_view: This resource creates a new network view in the Infoblox Grid.
- infoblox_ptr_record: This resource creates a PTR record in an existing DNS reverse mapping zone.
The Infoblox_ip_allocation resource will return an IP address.
The IP address returned by the Infoblox_ip_allocation resource can be used as input for the azurerm_network_interface resource to specify an IP address.
For full documentation on the Infoblox Provider, visit Infoblox.com and Terraform.io.
Deploy vNIOS with Terraform
You can also deploy vNIOS instances to a cloud platform using Terraform. By specifying the VM configuration and associated resources in a Terraform configuration file, you can ensure consistent standards for your vNIOS deployments. You can also achieve configurations that may not be readily available in cloud console deployments, for example deploying multiple vNIOS VMs into a resource group in Azure.
This screenshot shows a portion of the configuration used to deploy vNIOS in Azure using the azurerm_virtual_machine resource.
Here is a full sample configuration zip file for deploying vNIOS in Azure:
This configuration file creates a VNet with two subnets, an NSG with rules allowing Infoblox Grid and DNS traffic, and a vNIOS instance with two network interfaces.