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/ Description Example Value Required Specifies the fully qualified domain name to which you want to assign the IP address. Optional Specifies the network view to use when allocating an IP address from a network dynamically. Optional Specifies the DNS view in which the zone exists. If a value is not specified, the name Optional Specifies the Time to Live value for the record. There is no default value for this parameter. Optional Describes the record. Optional Specifies the set of NIOS extensible attributes that are attached to the record.
Optionalfqdn
host43.zone12.org
network_view
If a value is not specified, the name default
is used for the network view. For static allocation, do not use this field.networkview_name
dns_view
default
is used for DNS view.dns_view_name
ttl
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
static record #1
ext_attrs
jsonencode({})
infoblox_a_record
resource:
Parameter | Required/ | Description | Example Value |
---|---|---|---|
| Required only for static allocation | Specifies the IPv4 address to associate with the A record.
|
|
| Required only for dynamic allocation | Specifies the network from which to allocate an IP address when the |
|
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({})
}