- Failover is a backup operational mode that automatically switches to a standby database, server or network if the primary system fails, or is shut down for servicing.
- The auto-failover groups feature allows you to manage the replication and failover of some or all databases on a logical server to another region.
- This moudle focuses on using the Auto-failover group feature with Azure SQL Database .
Note : For more information, you can check example folder.
Terraform v0.15.4
Name | Type |
---|---|
azurerm_sql_server.main | resource |
azurerm_sql_firewall_rule.main | resource |
azurerm_sql_database.main | resource |
azurerm_sql_failover_group.failover_group | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
resource_group_name | Name of Resource Group | string |
yes | |
primary_server_name | Name of primary sql server. This we will get from another module | string |
yes | |
failover_group_name | Name of our SQL DB failover group | string |
yes | |
sql_failover_db_id | ID(s) of Failover SQL DB. This we will get from another module | list(string) |
yes | |
secondary_server_id | ID of Secondary sql server. This we will get from another module | string |
yes | |
failover_policy_mode | Mode of R/W endpoint failover policy | string |
Automatic | no |
failover_policy_grace_minutes | Grace minutes of R/W endpoint failover policy | string |
60 | no |
Name | Description |
---|---|
failover_group_id | The failover group ID. |
primary_server_name | The name of the primary SQL Database Server |
failover_group_location | the location of the failover group. |
- Tags are assigned to resources according requirement.
- Additial tags can be assigned by tags variables as defined above.
Check out these related projects.
module "sql_failover" {
source = "Location of your Module"
failover_group_name = ""
resource_group_name = module.res_group.resource_group_name
primary_server_name = module.mysql_firewall.sql_server_name[0]
sql_failover_db_id = module.mysql_firewall.sql_database_id
secondary_server_id = module.mysql_firewall.sql_server_id[1]
failover_policy_mode = ""
failover_policy_grace_minutes = ""
}
Reena Nain |
Anubhav Rana |
---|