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
The name/slug variables should be marked as optional when a scope_type = scope_id are used.
variable "vlan_id" {
default = 200
}
variable "site" {
default = "FRA1"
}
variable "availability_zone" {
default = "AZ01"
}
data "netbox_site" "site" {
name = var.site
}
data "netbox_location" "location" {
site_id = data.netbox_site.site.site_id
slug = var.availability_zone
}
data "netbox_vlan_group" "vlan_group" {
# name or slug is required (should be optional)
scope_type = "dcim.location"
scope_id = data.netbox_location.location.id
}
output "site" {
value = data.netbox_site.site
}
output "location" {
value = data.netbox_location.location
}
# output "netbox_vlan_group" {
# value = data.netbox_vlan_group.vlan_group
# }
Output
│ Error: Missing required argument
│
│ with data.netbox_vlan_group.vlan_group,
│ on query_via_location.tf line 23, in data "netbox_vlan_group" "vlan_group":
│ 23: data "netbox_vlan_group" "vlan_group" {
│
│ "name": one of `name,slug` must be specified
╵
Provider version: 3.9.2
Netbox version: 4.0.8
The text was updated successfully, but these errors were encountered:
Hello,
The name/slug variables should be marked as optional when a scope_type = scope_id are used.
Output
Provider version: 3.9.2
Netbox version: 4.0.8
The text was updated successfully, but these errors were encountered: