From 3387e8dc08891e60a53db989cb7bf80a88552e7c Mon Sep 17 00:00:00 2001 From: Marten Bohlin Date: Fri, 26 Mar 2021 22:14:33 +0100 Subject: [PATCH] Fix the issue #11019. The code always incorrectly thinks theres already a existing resource when creating a new. --- .../services/recoveryservices/site_recovery_fabric_resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azurerm/internal/services/recoveryservices/site_recovery_fabric_resource.go b/azurerm/internal/services/recoveryservices/site_recovery_fabric_resource.go index 243734d75644..4646da85f7d2 100644 --- a/azurerm/internal/services/recoveryservices/site_recovery_fabric_resource.go +++ b/azurerm/internal/services/recoveryservices/site_recovery_fabric_resource.go @@ -65,7 +65,7 @@ func resourceSiteRecoveryFabricCreate(d *schema.ResourceData, meta interface{}) existing, err := client.Get(ctx, name) if err != nil { // NOTE: Bad Request due to https://github.com/Azure/azure-rest-api-specs/issues/12759 - if !utils.ResponseWasNotFound(existing.Response) || !utils.ResponseWasBadRequest(existing.Response) { + if !utils.ResponseWasNotFound(existing.Response) && !utils.ResponseWasBadRequest(existing.Response) { return fmt.Errorf("Error checking for presence of existing site recovery fabric %s (vault %s): %+v", name, vaultName, err) } }