...
Excerpt | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The following table describes the parameters you can define in the resource block of the record:
|
Additionally, define the following parameters for 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 |
|
Note |
---|
NoteAll parameters except |
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"
}
resource "infoblox_a_record" "a_record_dynamic2"{
fqdn = "dynamic2.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"
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({})
}