Skip to content

netbox_vlans returns an error when no match #783

@mayorobadji

Description

@mayorobadji

Hi all,

Since the Netbox allows for creating the same VLANs and prefixes multiple times, we use the provider's datasources to avoid conflicts.

When using prefixes

data "netbox_prefixes" "supernet" { filter { name = "prefix" value = "1.1.1.0/32" } }
the block above returns an empty prefixes field when no match is found.

When using vlans

data "netbox_vlans" "vlan" { filter { name = "vid" value = "10" } }
the block above returns a "no result" error when no match is found.

Not sure whether it's an issue or not but why not return en empty field when no vlan is matched ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions