diff --git a/builtin/providers/azure/resource_azure_instance.go b/builtin/providers/azure/resource_azure_instance.go index 097b210f5..1ad82c1f6 100644 --- a/builtin/providers/azure/resource_azure_instance.go +++ b/builtin/providers/azure/resource_azure_instance.go @@ -622,7 +622,7 @@ func resourceAzureInstanceDelete(d *schema.ResourceData, meta interface{}) error return err } - err = resource.Retry(5*time.Minute, func() error { + err = resource.Retry(15*time.Minute, func() error { exists, err := blobClient.BlobExists( storageContainterName, fmt.Sprintf(osDiskBlobNameFormat, name), ) diff --git a/builtin/providers/azure/resource_azure_sql_database_server_firewall_rule_test.go b/builtin/providers/azure/resource_azure_sql_database_server_firewall_rule_test.go index 9202be7e1..cdd0ab457 100644 --- a/builtin/providers/azure/resource_azure_sql_database_server_firewall_rule_test.go +++ b/builtin/providers/azure/resource_azure_sql_database_server_firewall_rule_test.go @@ -2,6 +2,7 @@ package azure import ( "fmt" + "strings" "testing" "github.com/hashicorp/terraform/helper/resource" @@ -149,6 +150,10 @@ func testAccAzureDatabaseServerFirewallRuleDeleted(servers []string) resource.Te for _, server := range servers { rules, err := sqlClient.ListFirewallRules(server) if err != nil { + // ¯\_(ツ)_/¯ + if strings.Contains(err.Error(), "Cannot open server") { + return nil + } return fmt.Errorf("Error listing Azure Database Server Firewall Rules for Server %q: %s", server, err) } diff --git a/builtin/providers/azure/resource_azure_sql_database_service_test.go b/builtin/providers/azure/resource_azure_sql_database_service_test.go index 24d865774..31ea8990e 100644 --- a/builtin/providers/azure/resource_azure_sql_database_service_test.go +++ b/builtin/providers/azure/resource_azure_sql_database_service_test.go @@ -2,6 +2,7 @@ package azure import ( "fmt" + "strings" "testing" "github.com/hashicorp/terraform/helper/resource" @@ -146,6 +147,10 @@ func testAccCheckAzureSqlDatabaseServiceDeleted(s *terraform.State) error { sqlClient := testAccProvider.Meta().(*Client).sqlClient dbs, err := sqlClient.ListDatabases(*testAccAzureSqlServerName) if err != nil { + // ¯\_(ツ)_/¯ + if strings.Contains(err.Error(), "Cannot open server") { + return nil + } return fmt.Errorf("Error issuing Azure SQL Service list request: %s", err) }