Error message when i would to create failover group on azure

Hello everyone,

I want to make a Terraform plan for duplicate a sql with elastic pool but i’ve this message when i apply:

 Error: issuing create/update request for SQL Failover Group "test-failover-group" (Resource Group "db-test-fog-eastus-01", Server "db-test-fog-eastus-01"): sql.FailoverGroupsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="FailoverGroupUnableToPerformGroupOperationOnDatabases" Message="The operation cannot be performed due to multiple errors." Details=[{"code":"40857","message":"Elastic pool not found for server: 'db-test-fog-eastus-02', elastic pool name: 'pool-test-fog-01'."}]
│   with azurerm_sql_failover_group.db-test-fog-eastus,
│   on line 190, in resource "azurerm_sql_failover_group" "db-test-fog-eastus":
│  190: resource "azurerm_sql_failover_group" "db-test-fog-eastus" {
with azurerm_sql_fail over_group.db-test-fog-eastus,
on line 190, in resource "azurerm_sql_failover_group" "db-test-fog-eastus":
190: resource "azurerm_sql_failover_group" "db-test-fog-eastus" {

My code is:

resource "azurerm_sql_failover_group" "db-test-fog-eastus" {
  name                = "test-failover-group"
  resource_group_name = azurerm_sql_server.sqlserver.resource_group_name
  server_name         =
  databases           = []
  partner_servers {
    id =
    read_write_endpoint_failover_policy {
    mode          = "Automatic"
    grace_minutes = 60

How can I deploy that ?