From 555d09b73bd1d1d71ad31155d9572766cd609ed3 Mon Sep 17 00:00:00 2001 From: GCHQ Developer 609 <95346075+GCHQDeveloper609@users.noreply.github.com> Date: Wed, 6 Nov 2024 14:24:07 +0000 Subject: [PATCH] fix: don't lock DVSwitch when reading --- vsphere/resource_vsphere_distributed_virtual_switch.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vsphere/resource_vsphere_distributed_virtual_switch.go b/vsphere/resource_vsphere_distributed_virtual_switch.go index e7f3214a3..d24551155 100644 --- a/vsphere/resource_vsphere_distributed_virtual_switch.go +++ b/vsphere/resource_vsphere_distributed_virtual_switch.go @@ -132,7 +132,7 @@ func resourceVSphereDistributedVirtualSwitchRead(d *schema.ResourceData, meta in if err := viapi.ValidateVirtualCenter(client); err != nil { return err } - vsphereDistributedVirtualSwitchModificationMutex.Lock() + id := d.Id() dvs, err := dvsFromUUID(client, id) if err != nil { @@ -178,7 +178,6 @@ func resourceVSphereDistributedVirtualSwitchRead(d *schema.ResourceData, meta in customattribute.ReadFromResource(props.Entity(), d) } - vsphereDistributedVirtualSwitchModificationMutex.Unlock() return nil }