You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
netbox_prefixes should allow filtering of prefixes by custom fields as well as by more than one tag.
In addition, depth and length would be useful to filter on as well.
Justification/Use Case
We have a hierarchy of prefixes with a /14 representing a top level grouping, /16 a secondary level, and tenant groups get ranges below that. These groupings are represented in netbox via custom fields and/or tags. When finding an available prefix for a new tenant, it is not currently possible via the netbox_prefixes datasource to find the appropriate parent prefix e.g:
give me the /16 prefix which has these custom field values or these multiple tags
The best solution we can find so far is to aggregate multiple custom fields into a single tag and use that to filter, which is not ideal.
The text was updated successfully, but these errors were encountered:
I tried my hand at getting multiple tags working and will submit a PR once I add tests and possibly try to address some of the other proposed fields. I can see it is hard to chose which of the MANY available fields to expose via this datasource and why it isnt practical to support them all
PR to implicitly enable all standard fields (not just the small number currently explicitly supported) and allow multiple tag filters. Haven't been able to get custom fields working though: #428
Terraform Version
Terraform v1.4.0
on darwin_amd64
Affected Resource(s)
Please list the resources as a list, for example:
Proposed Functionality
netbox_prefixes
should allow filtering of prefixes by custom fields as well as by more than one tag.In addition, depth and length would be useful to filter on as well.
Justification/Use Case
We have a hierarchy of prefixes with a /14 representing a top level grouping, /16 a secondary level, and tenant groups get ranges below that. These groupings are represented in netbox via custom fields and/or tags. When finding an available prefix for a new tenant, it is not currently possible via the netbox_prefixes datasource to find the appropriate parent prefix e.g:
The best solution we can find so far is to aggregate multiple custom fields into a single tag and use that to filter, which is not ideal.
The text was updated successfully, but these errors were encountered: