From 0f06281ef5ef30982ffbf5f0c71fb6238bb8ba66 Mon Sep 17 00:00:00 2001 From: Paule <25357870+paulexyz@users.noreply.github.com> Date: Wed, 23 Nov 2022 18:43:28 +0100 Subject: [PATCH] fix: Region data source fix slug field I think the slug should also reference the slug instead of the name. I checked the region model in the source go module the field should be called Slug --- netbox/data_source_netbox_region.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/data_source_netbox_region.go b/netbox/data_source_netbox_region.go index 30e33c96..cc605afe 100644 --- a/netbox/data_source_netbox_region.go +++ b/netbox/data_source_netbox_region.go @@ -103,7 +103,7 @@ func dataSourceNetboxRegionRead(d *schema.ResourceData, m interface{}) error { result := res.GetPayload().Results[0] d.SetId(strconv.FormatInt(result.ID, 10)) d.Set("name", result.Name) - d.Set("slug", result.Name) + d.Set("slug", result.Slug) d.Set("description", result.Description) if result.Parent != nil { d.Set("parent_region_id", result.Parent.ID)