Skip to content

Commit

Permalink
rdb changes needed for 1st gen success
Browse files Browse the repository at this point in the history
  • Loading branch information
Mia-Cross committed Mar 26, 2024
1 parent bbeef76 commit 7a1caa3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 58 deletions.
34 changes: 7 additions & 27 deletions scaleway/resource_document_db_read_replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,15 @@ func ResourceScalewayDocumentDBReadReplica() *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).",
Expand Down Expand Up @@ -105,32 +111,6 @@ func ResourceScalewayDocumentDBReadReplica() *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,
},
},
},
},
Expand Down
34 changes: 7 additions & 27 deletions scaleway/resource_rdb_read_replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,15 @@ func ResourceScalewayRdbReadReplica() *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).",
Expand Down Expand Up @@ -117,32 +123,6 @@ func ResourceScalewayRdbReadReplica() *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,
},
},
},
},
Expand Down
8 changes: 4 additions & 4 deletions scaleway/resource_redis_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ func ResourceScalewayRedisCluster() *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{
Expand Down

0 comments on commit 7a1caa3

Please sign in to comment.