Add changed condition (#66230)

This commit is contained in:
Fred-sun 2020-01-25 14:01:17 +08:00 committed by Zim Kalinowski
parent a1f6c611b7
commit f1ec48429a

View file

@ -251,7 +251,10 @@ class AzureRMVirtualNetworkPeering(AzureRMModuleBase):
self.fail("Cannot update remote_virtual_network of Virtual Network Peering!")
# check if update
to_be_updated = self.check_update(response)
if response['peering_state'] == 'Disconnected':
to_be_updated = True
else:
to_be_updated = self.check_update(response)
else:
# not exists, create new vnet peering