It is now possible to add filters to DNS views that specify which IP addresses DNS address records should be created for. One use case is to provide a mechanism to only add specifically selected IP addresses to an external view used for queries from the internet, while all addresses get DNS records in the internal DNS view.
The syntax is essentially the same as for NetBox object permissions. For example this filter only selects IP addresses with a DNS Name starting with external- for DNS record creation:
{
"dns_name__startswith": "external-"
}
Probably more practically, a custom field named external could be created for IPAddress objects and the external zone gets the following filter:
{
"custom_field_data__external": true
}
If multiple terms are added to the JSON dictionary, the conditions will be combined by and. It is also possible to specify an array of dictionaries, which will result in the conditions specified by the dictionaries to be combined by or. That way it is possible to specify complex conditions for address record creation.
fixes #401
This PR contains an enhancement to IPAM DNSsync.
It is now possible to add filters to DNS views that specify which IP addresses DNS address records should be created for. One use case is to provide a mechanism to only add specifically selected IP addresses to an external view used for queries from the internet, while all addresses get DNS records in the internal DNS view.
The syntax is essentially the same as for NetBox object permissions. For example this filter only selects IP addresses with a DNS Name starting with
external-
for DNS record creation:Probably more practically, a custom field named
external
could be created forIPAddress
objects and the external zone gets the following filter:If multiple terms are added to the JSON dictionary, the conditions will be combined by
and
. It is also possible to specify an array of dictionaries, which will result in the conditions specified by the dictionaries to be combined byor
. That way it is possible to specify complex conditions for address record creation.