Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt

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 for to which you want to assign the IP address to.

host43.zone12.org

network_view

Optional

Specifies the Network 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 default DNS view is consideredname.

dns_view_name

ttl

Optional

Specifies the time Time to live Live value for the record. There is no default value for this parameter.
If you do not specify a value is not specified, then in NIOS, the TTL value is inherited from Grid DNS propertiesthe 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

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

jsonencode({})

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

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,

do not use this field. Instead, define
  • configure the cidr field instead of ip_addr. Optionally,

set the 
  • specify a network_view if you do not want to allocate it in

the 
  • the network view default

 network view
  • .

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

this field

cidr.

192.168.10.4/30

...

Note

...

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_record_static1rec1" {
  # # the zone 'exampleexample1.comorg' MUST must exist in the DNS view ('default')
  fqdn fqdn = "static1.exampleexample1.comorg"
  ip ip_addr = "1921.1683.315.31"
  ttl = 10
  comment = "static A-record #1"
  ext_attrs = jsonencode({
    "Tenant ID" = "tf-plugin"
    "Cloud API Owned" = "True"
    "CMP Type"= "VMware"
    "Location" = "New York"
    "Site" = "HQ"
  })
}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_record_static2rec2" {
  fqdn fqdn = "static2.exampleexample4.comorg"
  ip ip_addr = "1921.1683.315.321"
  ttl = 0 # ttl=0 means 'do not cache'
  dns comment = "example static A-record a_rec2"
dns_view = "non_default_dnsview" # corresponding DNS view MUST exist
}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_record_dynamic1rec3" {
  fqdn fqdn = "dynamic1.exampleexample2.comorg"
  # ip_addr = "" # CIDR is used for dynamic allocation
  # ttl = 0 # not mentioning TTL value means
            # using parent zone's TTL value.
  # In case of non-default network view,
  # you should specify a DNS view as well.
  network_view = "non_default" # corresponding network view MUST exist
  dns cidr = 10.1.0.0/24 // the network must exist, you may use
// the example for infoblox_ipv4_network resource.
network_view = "nondefault_view" # corresponding DNS view MUST exist
  # appropriate network MUST exist in the network view
  cidr = "infoblox_ipv4_network.ipv4_network.cidr"
}
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" "a_record_dynamic2rec"{
  fqdn fqdn = "dynamic2very-interesting-host.example.com"
  # not specifying explicitly means using the default network view
  # network_view = "default"
  # not specifying explicitly means using the default DNS view
  # dns_view = "default"
  # appropriate network MUST exist in the network view
  cidr = "infoblox_ipv4_network.ipv4_network.cidr ext_attrs = jsonencode({
"Location" = "65.8665701230204, -37.00791763398113"
})
filter_params = jsonencode({
    "*Site": "Turkey"
    })
    comment = "A record"
}