Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

number of items limitation in netbox_device_interfaces #535

Open
joaofeteira opened this issue Jan 10, 2024 · 1 comment
Open

number of items limitation in netbox_device_interfaces #535

joaofeteira opened this issue Jan 10, 2024 · 1 comment

Comments

@joaofeteira
Copy link

Issue Reporting Guide

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform
issue tracker reserved for bug reports and feature requests. For general usage
questions, please see: https://www.terraform.io/community.html.

Terraform Version

Terraform v1.6.6
on linux_amd64

  • provider registry.terraform.io/e-breuninger/netbox v3.7.6

Affected Resource(s)

  • netbox_device_interfaces

Hi,

I am trying this data source and having some issues i think due to some limitation of the maximum items it can output?

For instance if i just have something like this:

data "netbox_device_interfaces" "device_interfaces" {
}

The output of this data source doesn't include some interfaces that I know for sure exist in netbox.
If i try to limit the data source with a filter:

data "netbox_device_interfaces" "device_interfaces" {
  filter {
    name  = "device_id"
    value = "9"
  }
}

They appear correctly.
The issue is that I wanted to have all the interfaces in all devices in this data source. Is this possible or are we hitting some limitations in the maximum items allowed either in this netbox provider or terraform itself?

Thanks a lot
BR

References

Are there any other GitHub issues (open or closed) or Pull Requests that should
be linked here? For example:

@joaofeteira joaofeteira changed the title number of items limitation in number of items limitation in netbox_device_interfaces Jan 10, 2024
@fbreckle
Copy link
Collaborator

I added the limit attribute to that data source in 3.8.4.
This way, you can manually increase the amount of items the data source returns or set it to 0 to remove the limit or set it up to MAX_PAGE_SIZE (default: 1000).
Returning more than MAX_PAGE_SIZE results is not something the provider can do right now, because it would then have handle pagination, which it currently does not.

You did not mention how many results you got in your incomplete data source responses, I assume it probably was 50, which seems to be the default limit as per the link above.

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

No branches or pull requests

2 participants