Skip to content

Comments

feat: add support for NetBox custom fields#115

Open
fmcglinn wants to merge 1 commit intosukiyaki:mainfrom
fmcglinn:feature/custom-field-support
Open

feat: add support for NetBox custom fields#115
fmcglinn wants to merge 1 commit intosukiyaki:mainfrom
fmcglinn:feature/custom-field-support

Conversation

@fmcglinn
Copy link

Allow using custom fields (prefixed with cf_) as the source for DNS names. This allows multiple DNS records without hijacking the description field.

The field_name parameter now accepts:

  • Standard fields: dns_name, description
  • Custom fields: cf_<field_name>

Example Use Case

  • Use the dns_name field for reverse DNS (PTR records)
  • Use a custom field additional_dns for forward DNS (A/AAAA records) to allow multiple services.
providers:
  # Provider for reverse DNS - uses dns_name field
  # This creates PTR records pointing to the canonical hostname
  netbox:
    class: octodns_netbox.NetboxSource
    url: env/NETBOX_URL
    token: env/NETBOX_TOKEN
    ttl: 3600
    field_name: dns_name

  # Provider for forward DNS - uses custom field
  # This creates A/AAAA records for service aliases
  netbox-additional:
    class: octodns_netbox.NetboxSource
    url: env/NETBOX_URL
    token: env/NETBOX_TOKEN
    ttl: 3600
    field_name: cf_additional_dns

zones:
  example.com.:
    sources:
      - netbox    # dns_name field
      - netbox-additional    # cf_additional_dns
    targets:
      - output

  # Reverse zone - uses the dns_name provider
  2.0.192.in-addr.arpa.:
    sources:
      - netbox
    targets:
      - output

Allow using custom fields (prefixed with cf_) as the source for DNS names.

The field_name parameter now accepts:
- Standard fields: dns_name, description
- Custom fields: cf_<field_name>
@fmcglinn fmcglinn marked this pull request as draft January 18, 2026 03:39
@fmcglinn fmcglinn marked this pull request as ready for review January 18, 2026 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant