_This issue was originally opened by @virtualbubble as hashicorp/terraform#17864. It was migrated here as a result of the provider split. The original body of the issue is below._
Feature Request: azurerm_sql_database resource.
Feature
ability to setup geo replication (secondary DB).
Is there a timeline to have this capability available?
hey @evandropaula
This isn't on our short-term roadmap - that said we'd happily accept a community contribution for it :)
I've not used the functionality outlined above, but am I correct in thinking that this is called Failover Groups? If so - support for this is available in the Azure SDK for Go - which means it should be possible to add :)
Thanks!
We use Failover Groups and would love to see this supported so we can stop using the ARM resource.
Do we know is this item in the road-map?
Hi is there any update on when this is likely to appear in the product? It makes it harder to argue for using TF as the tool to manage production Azure SQL environments without it...
@tombuildsstuff this is different from failover groups... https://docs.microsoft.com/en-us/azure/sql-database/sql-database-active-geo-replication
Does not looks like its being worked on.
Hello darkness, my old friend... ARM templates and Rest APIs...
Looking at https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/azurerm/resource_arm_sql_database.go#L53 it lists "OnlineSecondary" as a valid create mode. I tried this myself and have been able to create an active geo-replicated database with something like the below.
resource "azurerm_sql_database" "primary" {
name = var.database_name
resource_group_name = azurerm_resource_group.primary.name
location = azurerm_resource_group.primary.location
server_name = azurerm_sql_server.primary.name
requested_service_objective_name = "ElasticPool"
edition = "standard"
elastic_pool_name = azurerm_mssql_elasticpool.primary.name
}
resource "azurerm_sql_database" "secondary" {
create_mode = "OnlineSecondary"
source_database_id = azurerm_sql_database.primary.id
name = var.database_name
resource_group_name = azurerm_resource_group.secondary.name
location = azurerm_resource_group.secondary.location
server_name = azurerm_sql_server.secondary.name
edition = "standard"
elastic_pool_name = azurerm_mssql_elasticpool.secondary.name
}
Is the Geo Replication planned to be added soon?
Zone redundancy has been added to version 2.0 of the provider:
https://www.terraform.io/docs/providers/azurerm/r/sql_database.html#zone_redundant
I'm working on this
This has been released in version 2.3.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:
provider "azurerm" {
version = "~> 2.3.0"
}
# ... other configuration ...
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
Most helpful comment
Do we know is this item in the road-map?