...
Excerpt | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The following table describes the parameters you can define in the resource block of the record:
|
Additionally, define the following parameters for 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 exceptexcept the and with if you do not want to use the default network view. |
Examples of the A Record Block
resource "infoblox_a_record" "a_record_static1"{
# the zone 'example.com' MUST exist in the DNS view ('default')
fqdn = "static1.example.com"
ip_addr = "192.168.31.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"
})
}
resource "infoblox_a_record" "a_record_static2"{
fqdn = "static2.example.com"
ip_addr = "192.168.31.32"
ttl = 0 # ttl=0 means 'do not cache'
dns_view = "non_default_dnsview" # corresponding DNS view MUST exist
}
resource "infoblox_a_record" "a_record_dynamic1"{
fqdn = "dynamic1.example.com"
# 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_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"
}