Creating Azurerm Redis enterprise database

I’m trying to create a geo replication between 2 clusters (cluster1 and cluster2) by using the azurerm_redis_enterprise_database command.

I wrote the following code snipets:

resource "azurerm_redis_enterprise_database" "enterprise-database" {
  name                  = "default"
  cluster_id            =
  client_protocol       = "Encrypted"
  clustering_policy     = "EnterpriseCluster"
  eviction_policy       = "NoEviction"
  port                  = 10000

  linked_database_id = [

  linked_database_group_nickname = "geo-replica-group"

The code run successfully but I’m not understanding what it does exactly, is it creating the databases and linking it or is it just linking it?

I’m not understanding why the cluster_id is needed, does it create a database for that particular cluster, however, when I try to create one for the cluster2 it failed.