provider/azure: Don't delete firewall rules on non-existent servers
This commit is contained in:
parent
7d7c8799ac
commit
a52c4bce66
|
@ -209,6 +209,9 @@ func resourceAzureSqlDatabaseServerFirewallRuleDelete(d *schema.ResourceData, me
|
|||
// go ahead and delete the rule:
|
||||
log.Printf("[INFO] Issuing deletion of Azure Database Server Firewall Rule %q in Server %q.", name, serverName)
|
||||
if err := sqlClient.DeleteFirewallRule(serverName, name); err != nil {
|
||||
if strings.Contains(err.Error(), "Cannot open server") {
|
||||
break
|
||||
}
|
||||
return fmt.Errorf("Error deleting Azure Database Server Firewall Rule %q for Server %q: %s", name, serverName, err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue