diff --git a/internal/services/documentdb/read_replica.go b/internal/services/documentdb/read_replica.go index 43bb7150a..9f7d1cf88 100644 --- a/internal/services/documentdb/read_replica.go +++ b/internal/services/documentdb/read_replica.go @@ -49,9 +49,15 @@ func ResourceReadReplica() *schema.Resource { Optional: true, Description: "Direct access endpoint, it gives you an IP and a port to access your read-replica", MaxItems: 1, + Elem: &schema.Resource{}, + }, + "endpoints_spec": { + Type: schema.TypeList, + Computed: true, + Description: "Endpoints specs", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - // Endpoints common + // Endpoints common specs "endpoint_id": { Type: schema.TypeString, Description: "UUID of the endpoint (UUID format).", @@ -107,32 +113,6 @@ func ResourceReadReplica() *schema.Resource { Description: "Private network zone", Computed: true, }, - // Endpoints common - "endpoint_id": { - Type: schema.TypeString, - Description: "UUID of the endpoint (UUID format).", - Computed: true, - }, - "ip": { - Type: schema.TypeString, - Description: "IPv4 address of the endpoint (IP address). Only one of ip and hostname may be set", - Computed: true, - }, - "port": { - Type: schema.TypeInt, - Description: "TCP port of the endpoint", - Computed: true, - }, - "name": { - Type: schema.TypeString, - Description: "Name of the endpoints", - Computed: true, - }, - "hostname": { - Type: schema.TypeString, - Description: "Hostname of the endpoint. Only one of ip and hostname may be set", - Computed: true, - }, }, }, }, diff --git a/internal/services/rdb/read_replica.go b/internal/services/rdb/read_replica.go index 26990f3ae..b56cdb1fb 100644 --- a/internal/services/rdb/read_replica.go +++ b/internal/services/rdb/read_replica.go @@ -55,9 +55,15 @@ func ResourceReadReplica() *schema.Resource { Optional: true, Description: "Direct access endpoint, it gives you an IP and a port to access your read-replica", MaxItems: 1, + Elem: &schema.Resource{}, + }, + "endpoints_spec": { + Type: schema.TypeList, + Computed: true, + Description: "Endpoints specs", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - // Endpoints common + // Endpoints common specs "endpoint_id": { Type: schema.TypeString, Description: "UUID of the endpoint (UUID format).", @@ -119,32 +125,6 @@ func ResourceReadReplica() *schema.Resource { Description: "Private network zone", Computed: true, }, - // Endpoints common - "endpoint_id": { - Type: schema.TypeString, - Description: "UUID of the endpoint (UUID format).", - Computed: true, - }, - "ip": { - Type: schema.TypeString, - Description: "IPv4 address of the endpoint (IP address). Only one of ip and hostname may be set", - Computed: true, - }, - "port": { - Type: schema.TypeInt, - Description: "TCP port of the endpoint", - Computed: true, - }, - "name": { - Type: schema.TypeString, - Description: "Name of the endpoints", - Computed: true, - }, - "hostname": { - Type: schema.TypeString, - Description: "Hostname of the endpoint. Only one of ip and hostname may be set", - Computed: true, - }, }, }, }, diff --git a/internal/services/redis/cluster.go b/internal/services/redis/cluster.go index 99f767f8c..4dde4d41b 100644 --- a/internal/services/redis/cluster.go +++ b/internal/services/redis/cluster.go @@ -168,10 +168,10 @@ func ResourceCluster() *schema.Resource { }, // Computed "public_network": { - Type: schema.TypeList, - Optional: true, - Computed: true, - MaxItems: 1, + Type: schema.TypeList, + //Optional: true, + Computed: true, + //MaxItems: 1, Description: "Public network specs details", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{