Skip to content

OT-terraform-azure-modules/terraform-azure-sql-failover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure terraform-azure-sql-failover

Opstree Solutions

Opstree Solutions

  • 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 versions

Terraform v0.15.4

Resources

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

Inputs

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

Output

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

  • Tags are assigned to resources according requirement.
  • Additial tags can be assigned by tags variables as defined above.

Related Projects

Check out these related projects.

Usage

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 = ""
}

Contributors

Reena Nain
Reena Nain
Anubhav Rana
Anubhav Rana

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages