From f87d87994d3a0ad81d8e9be037f48e1fd3b79c18 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Wed, 1 Mar 2023 13:40:19 +0530 Subject: [PATCH] vlanid 0 is supported --- nutanix/resource_nutanix_subnet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nutanix/resource_nutanix_subnet.go b/nutanix/resource_nutanix_subnet.go index 4a0e78f69..b1b6fba14 100644 --- a/nutanix/resource_nutanix_subnet.go +++ b/nutanix/resource_nutanix_subnet.go @@ -717,7 +717,7 @@ func getSubnetResources(d *schema.ResourceData, subnet *v3.SubnetResources) { dhcpo.DomainSearchList = expandStringList(v.([]interface{})) } - if v, ok := d.GetOk("vlan_id"); ok { + if v, ok := d.GetOkExists("vlan_id"); ok { if v.(int) == 0 || ok { subnet.VlanID = utils.Int64Ptr(int64(v.(int))) }