The infoblox_ip_allocation
resource allows allocation of a new IP address from a network that already exists as a NIOS object. The IP address can be allocated statically by specifying an address or , dynamically as the next available IP address from the specified IPv4 and/or IPv6 network blocks or by specifying the extensible attribute filters of parent network.
The allocation is done by creating a host record in NIOS with an IPv4 address, an IPv6 address, or both assigned to the record. The allocated IP address is marked as ‘used’ in the appropriate network block.
...
Parameter | Required/ | Description | Example Value |
---|---|---|---|
| Required | Specifies the name (in FQDN format) of a host with which an IP address needs to be allocated. |
|
| Optional | Specifies the network view from which to get the specified network block. |
|
| Optional | Specifies the DNS view in which to create the DNS resource records that are associated with the IP address.
For more information, see the description of the |
|
| Optional | A flag that specifies whether DNS records associated with the resource must be created. When you update the enable_dns parameter, consider the following points:
|
|
| Required only for dynamic allocation | Specifies the IPv4 network block (in CIDR format) from where to allocate an IP address. |
|
| Required only for dynamic allocation | Specifies the IPv6 network block (in CIDR format) from where to allocate an IP address. |
|
| Required only for static allocation | Specifies an IPv4 address to allocate. |
|
| Required only for static allocation | Specifies an IPv6 address to allocate. |
|
| Optional | Specifies the extensible attributes of the parent network that must be used as filters to retrieve the next available IP address for creating the host record object. |
|
| Optional | Specifies the type of IP address to allocate. The valid values are, |
|
| Optional | Disables the record if set to |
|
| Optional | Specifies a list of aliases for the host record. |
|
| Optional | Specifies the time to live value for the DNS record. |
|
| Optional | Specifies the human readable description of the resource. |
|
| Optional | Specifies the set of NIOS extensible attributes that are attached to the NIOS resource. An extensible attribute must be a JSON map translated into a string value. |
|
...
// dynamic allocation
resource "infoblox_ip_allocation" "allocation5" {
dns_view = "nondefault_dnsview2"
network_view = "nondefault_netview"
fqdn = "host5.example4.org"
ipv6_cidr = infoblox_ipv6_network.net2.cidr
ipv4_cidr = infoblox_ipv4_network.net2.cidr
}
//Host record resource using next-available-IP address based on extensible attributes tag
resource "infoblox_ip_allocation" "rec_host17" {
fqdn = "new777.test.com"
aliases = ["www.test.com"]
disable = false
//Extensible attributes of parent network
filter_params = jsonencode({
"*Site": "Turkey"
})
ip_address_type = "Both"
enable_dns = true
ttl = 60
}