Share via

Private Link for SQL FO Group

Pallab Chakraborty 401 Reputation points
2021-06-08T13:47:29.25+00:00

I have an Azure Web App connecting to SQL FO Group at the moment using the Read/Write Listener of the SQL FO group connection string. I would like to use Private Link with Private Endpoint for the SQL DBs. So my Web App has to be enabled for Regional VNET integration if i am not wrong. I would like to know whether i need to create two private endpoints per Server or not for my Web App to work correctly if there is a failover of the SQL Database from primary to secondary.

I am following this url :
https://learn.microsoft.com/en-us/azure/architecture/example-scenario/sql-failover/app-service-private-sql-multi-region#alternatives

I am using Terraform for provisioning infrastructure.
So i would like to know if i have to specify one SQL Private Link for the two private endpoints or not

resource "azurerm_private_endpoint" "sql-primary-endpoint" {  
  name                = module.names-pvt-endpoint.location.private_endpoint.name_unique  
  location            = var.resource_group_location   
  resource_group_name = var.resource_group_name  
  subnet_id           = data.azurerm_resources.sub-net.id   
  
  private_service_connection {  
    name                           = "sql-primary-connection"  
    private_connection_resource_id = azurerm_private_link_service.sql-pvt-link.id  
    is_manual_connection           = false  
  }  
}  
  
resource "azurerm_private_endpoint" "sql-secondary-endpoint" {  
  name                = module.names-pvt-endpoint-secondary.location.private_endpoint.name_unique  
  location            = "eastus2"   
  resource_group_name = var.resource_group_name  
  subnet_id           = data.azurerm_resources.sub-net.id   
  
  private_service_connection {  
    name                           = "sql-secondary-connection"  
    private_connection_resource_id = azurerm_private_link_service.sql-pvt-link.id  
    is_manual_connection           = false  
  }  
}  
Azure SQL Database
Community Center | Not monitored

Answer accepted by question author

Anurag Sharma 17,636 Reputation points
2021-06-15T06:55:57.007+00:00

Thanks for your patience. Another reply we received from PG "Configuring Private Endpoint for Azure SQL Database doesn’t require any connection string changes, so there shouldn’t be any issues from the POV of connecting to the FOG R/W or read only listener. Of course, you will need to make sure that the apps have access to the VNet where the Private Endpoint is deployed."

Please let us know if this answers your query.

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.