Author: Mrigank Gupta
Introduction
In the realm of network automation and infrastructure management, Infoblox has been a frontrunner, reliably and consistently providing cutting-edge solutions to simplify and streamline complex network assignments. With the most recent update, v2.5 of the Infoblox IPAM Driver for Terraform, users can anticipate even greater efficiency, flexibility, and control over their network resources. Let’s delve into this update’s exciting new features and enhancements.
Terraform is a widely used infrastructure-as-code software tool created by HashiCorp. Users define and provide data center infrastructure using a declarative configuration language known as HashiCorp Configuration Language, or optionally, JSON. This lets you build, change and version cloud and on-prem resources safely and efficiently. We always fix bugs with our latest updates and try to enhance the user experience, but this time, there are also some additions to it.
Terraform-Infoblox Integration
A provider plugin for Terraform that makes it possible to manage Infoblox NIOS (Network Identity Operating System) resources using Terraform infrastructure-as-code solutions is now available. The plugin enables lifecycle management of Infoblox NIOS DDI resources. The Infoblox IPAM Plugin for Terraform interfaces with Infoblox vNIOS through REST API to provide IP Address Management and DNS Services. Instead of manually provisioning IP addresses and DNS records for network devices and interfaces in your infrastructure, the Infoblox IPAM Plugin for Terraform automates IPAM processes. The latest version of Infoblox provider is v2.5.
Available Resources
Currently, Terraform resources can be broadly divided into two categories: Terraform Resources and Data Sources. A Terraform resource constitutes a resource block that describes one or more NIOS Grid objects, such as a network container. A Terraform Data Source allows data to be fetched or computed for use elsewhere in the Terraform configuration. With Data Sources, Terraform configuration is built on information defined outside of Terraform or defined by a separate Terraform configuration.
To perform a fetch, create, read, update or delete operation on a NIOS object, you must define the appropriate resource block in the Terraform configuration (.tf) file. The following topics detail the resources and data sources supported by Infoblox IPAM Plug-In version 2.5 for Terraform and include appropriate examples of blocks that must be defined in the configuration file. For more details on Terraform’s available resources and Data Sources, visit Infoblox Plug-in for Terraform.
Recent Developments, Additions and Updates
New Additions
There are two new additions in resources: DNS view and the much-awaited DNS authoritative zones. The same has been added in data sources which means you can now easily manage and read/fetch DNS views and DNS zones via terraform. Now, let’s see the required fields for both of these resources.
DNS authoritative zones
The infoblox_zone_auth resource enables you to perform the create, update, and delete operations on the forward-mapping and reverse-mapping authoritative zones in a NIOS appliance. The resource represents the ‘zone_auth’ WAPI object in NIOS.
Fields required for DNS Zone Resource and Data Source
Parameter | Description | Example |
---|---|---|
fqdn | The name of the DNS zone. For a reverse zone, this is in CIDR format. For other zones, this is in FQDN format. This value can be in unicode format. | demozone.com For reverse mapping zone: 11.10.0.0/24 |
view | The name of the DNS view in which the zone resides. | external |
zone_format | Determines the format of the zone. Valid values are FORWARD, IPV4 and IPV6. | FORWARD |
ns_group | The name server group that serves DNS for this zone. | demoGroup |
comment | A description of the DNS zone. This is a regular comment. | The Auth zone object in NIOS. |
ext_attrs | The set of extensible attributes of the DNS view, if any. The content is formatted as a string of JSON map. |
{\”Location\”:\”unknown\”, \”TestEA\”:\”ZoneTesting\”} |
Example Template for DNS Zone Resource infoblox_zone_auth_resource.yaml
Example Template for DNS Zone Data Source infoblox_zone_auth_data_source.yaml
New Features
Ability to search through Extensible Attributes in data sources
Terraform data sources allow data to be fetched or computed for use elsewhere in the Terraform configuration. With data sources, Terraform configuration is built on information defined outside of Terraform or by a separate Terraform configuration. It is like a fetch operation performed with API. Terraform data sources let you dynamically fetch data from APIs or other Terraform state backends. Examples of data sources include machine image IDs from a cloud provider or Terraform outputs from other configurations. Data sources make your configuration more flexible and dynamic and let you reference values from other configurations, helping you scope your configuration while still referencing any dependent resource attributes. In HCP Terraform, workspaces let you share data between workspaces.
We had data sources developed for the corresponding resources way back, but we addressed the pain point for our customers, particularly with large landscapes where an organization is handling around 50k objects day in and day out.
Remembering all their details becomes very difficult, especially with just a single network manager or engineer. So, to deal with this issue, we came up with this solution, where you can search through any data source using the filters option.
From version 2.5.0, new feature filters are introduced. Now the data sources to support populate more than one matching NIOS object
filters: the schema, with a passing combination of searchable fields, is supported by the NIOS server, which returns one or more matching objects from the NIOS server. For usage of filters, add the fields as keys and appropriate values to be passed to the keys like name, view corresponding to object.
Example for using filters:
|
The list of matching objects as JSON format is returned in output under results, with fields or arguments that are passed in the filters.
Filters will support EA Search, i.e., fetching matching objects or records associated with the EAs corresponding to the provided data source, if any.
Example for using filters for EA Search:
|
Filters will also support Multi Value EA Search, where if the EA has more than one value, it is passed as a comma-separated string. Here, EAs can have multiple or multi-value types like ‘string’, ‘integer’, etc.
The data source block you define for a NIOS object includes the filters argument, which allows you to specify the parameters that the corresponding object in Infoblox WAPI supports.
When you specify the extensible attributes filters in a data source block, you must use the following format: “*
Example for using Multi Value EA Search:
|
Conclusion
In the ever-evolving landscape of network automation and infrastructure management, the latest iteration of the Infoblox Terraform Provider, version 2.5, stands as a testament to our commitment to empowering users with enhanced efficiency and control over their network resources.
With the integration of Terraform and Infoblox, managing NIOS resources has never been more seamless. The introduction of DNS authoritative zones adds a new dimension to resource management, enabling users to effortlessly create, update and delete DNS configurations directly from their Terraform configurations files.
Moreover, our focus on user experience extends to the introduction of powerful filtering capabilities in data sources. This feature allows users to search through an extensive database of your network resources/objects with ease, enhancing productivity and simplifying the management of large-scale network infrastructures.
As we continue to innovate and refine our solutions, we remain dedicated to providing cutting-edge tools that empower organizations to adapt and thrive in the dynamic world of network automation. With the Infoblox Terraform Provider v2.5, the future of network management is within reach, offering unprecedented flexibility, efficiency and control.
Stay tuned for future updates and enhancements as we continue to evolve our solutions to meet the changing needs of our customers.