/
infoblox_a_record Resource

infoblox_a_record Resource

An A record resource associates a domain name with an IPv4 address.

The following table describes the parameters you can define in the resource block of the record:

Parameter

Required/
Optional

Description

Example Value

fqdn

Required

Specifies the fully qualified domain name to which you want to assign the IP address.

host43.zone12.org

network_view

Optional

Specifies the network view to use when allocating an IP address from a network dynamically.
If a value is not specified, default will be used as the network view name.
For static allocation, do not use this field.

networkview_name

dns_view

Optional

Specifies the DNS view in which the record’s zone exists.
If a value is not specified, default will be used as the DNS view name.

dns_view_name

ttl

Optional

Specifies the Time to Live value for the record. There is no default value for this parameter.
If a value is not specified, then in NIOS, the TTL value is inherited from the parent object of the DNS record for this resource. A TTL value of 0 (zero) means caching should be disabled for this record.

600

comment

Optional

Describes the record.

static record #1

ext_attrs

Optional

Specifies the set of NIOS extensible attributes that are attached to the record.

jsonencode({})

Additionally, define any one of the following parameters for the infoblox_a_record resource:

Parameter

Required/
Optional

Description

Example Value

Parameter

Required/
Optional

Description

Example Value

ip_addr



Required only for static allocation

Specifies the IPv4 address to associate with the A record.

  • For allocating a static IP address, specify a valid IP address.

  • For allocating a dynamic IP address, configure the cidr field instead of ip_addr. Optionally, specify a network_view if you do not want to allocate it in the network view default.

91.84.20.6

cidr

Required only for dynamic allocation

Specifies the network from which to allocate an IP address when the ip_addr field is empty.
The address is in CIDR format. For static allocation, use ip_addr instead of cidr.

192.168.10.4/30

filter_params

Required only if ip_addr and cidr are not set

Specifies the extensible attributes of the parent network that must be used as filters to retrieve the next available IP address for creating the record object.

jsonencode({
   "*Site": "Turkey"
    })

Examples of the A Record Block

//minimal set of parameters required to statically create an A record
resource "infoblox_a_record" "a_rec1" {
# the zone 'example1.org' must exist in the DNS view ('default')
fqdn = "static1.example1.org"
ip_addr = "1.3.5.4" // not necessarily from a network existing in NIOS DB
}

 

//full set of parameters required to statically create an A record
resource "infoblox_a_record" "a_rec2" {
fqdn = "static2.example4.org"
ip_addr = "1.3.5.1"
comment = "example static A-record a_rec2"
dns_view = "nondefault_dnsview2"
ttl = 120 // 120s
ext_attrs = jsonencode({
"Location" = "65.8665701230204, -37.00791763398113"
})
}

 

//full set of parameters required to dynamically create an A record
resource "infoblox_a_record" "a_rec3" {
fqdn = "dynamic1.example2.org"
cidr = 10.1.0.0/24 // the network must exist, you may use
// the example for infoblox_ipv4_network resource.
network_view = "nondefault_netview" // not necessarily in
// the same network view as the DNS view resides in.
comment = "example dynamic A-record a_rec3"
dns_view = "nondefault_dnsview1"
ttl = 0 // 0 = disable caching
ext_attrs = jsonencode({})
}

//create an A record using next-available-IP address based on extensible attributes tag
resource "infoblox_a_record" "rec"{
fqdn = "very-interesting-host.example.com"
ext_attrs = jsonencode({
"Location" = "65.8665701230204, -37.00791763398113"
})
filter_params = jsonencode({
    "*Site": "Turkey"
    })
    comment = "A record"
}


Related content