Skip to content

Commit 7a1caa3

Browse files
committed
rdb changes needed for 1st gen success
1 parent bbeef76 commit 7a1caa3

3 files changed

+18
-58
lines changed

scaleway/resource_document_db_read_replica.go

+7-27
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,15 @@ func ResourceScalewayDocumentDBReadReplica() *schema.Resource {
4747
Optional: true,
4848
Description: "Direct access endpoint, it gives you an IP and a port to access your read-replica",
4949
MaxItems: 1,
50+
Elem: &schema.Resource{},
51+
},
52+
"endpoints_spec": {
53+
Type: schema.TypeList,
54+
Computed: true,
55+
Description: "Endpoints specs",
5056
Elem: &schema.Resource{
5157
Schema: map[string]*schema.Schema{
52-
// Endpoints common
58+
// Endpoints common specs
5359
"endpoint_id": {
5460
Type: schema.TypeString,
5561
Description: "UUID of the endpoint (UUID format).",
@@ -105,32 +111,6 @@ func ResourceScalewayDocumentDBReadReplica() *schema.Resource {
105111
Description: "Private network zone",
106112
Computed: true,
107113
},
108-
// Endpoints common
109-
"endpoint_id": {
110-
Type: schema.TypeString,
111-
Description: "UUID of the endpoint (UUID format).",
112-
Computed: true,
113-
},
114-
"ip": {
115-
Type: schema.TypeString,
116-
Description: "IPv4 address of the endpoint (IP address). Only one of ip and hostname may be set",
117-
Computed: true,
118-
},
119-
"port": {
120-
Type: schema.TypeInt,
121-
Description: "TCP port of the endpoint",
122-
Computed: true,
123-
},
124-
"name": {
125-
Type: schema.TypeString,
126-
Description: "Name of the endpoints",
127-
Computed: true,
128-
},
129-
"hostname": {
130-
Type: schema.TypeString,
131-
Description: "Hostname of the endpoint. Only one of ip and hostname may be set",
132-
Computed: true,
133-
},
134114
},
135115
},
136116
},

scaleway/resource_rdb_read_replica.go

+7-27
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,15 @@ func ResourceScalewayRdbReadReplica() *schema.Resource {
5353
Optional: true,
5454
Description: "Direct access endpoint, it gives you an IP and a port to access your read-replica",
5555
MaxItems: 1,
56+
Elem: &schema.Resource{},
57+
},
58+
"endpoints_spec": {
59+
Type: schema.TypeList,
60+
Computed: true,
61+
Description: "Endpoints specs",
5662
Elem: &schema.Resource{
5763
Schema: map[string]*schema.Schema{
58-
// Endpoints common
64+
// Endpoints common specs
5965
"endpoint_id": {
6066
Type: schema.TypeString,
6167
Description: "UUID of the endpoint (UUID format).",
@@ -117,32 +123,6 @@ func ResourceScalewayRdbReadReplica() *schema.Resource {
117123
Description: "Private network zone",
118124
Computed: true,
119125
},
120-
// Endpoints common
121-
"endpoint_id": {
122-
Type: schema.TypeString,
123-
Description: "UUID of the endpoint (UUID format).",
124-
Computed: true,
125-
},
126-
"ip": {
127-
Type: schema.TypeString,
128-
Description: "IPv4 address of the endpoint (IP address). Only one of ip and hostname may be set",
129-
Computed: true,
130-
},
131-
"port": {
132-
Type: schema.TypeInt,
133-
Description: "TCP port of the endpoint",
134-
Computed: true,
135-
},
136-
"name": {
137-
Type: schema.TypeString,
138-
Description: "Name of the endpoints",
139-
Computed: true,
140-
},
141-
"hostname": {
142-
Type: schema.TypeString,
143-
Description: "Hostname of the endpoint. Only one of ip and hostname may be set",
144-
Computed: true,
145-
},
146126
},
147127
},
148128
},

scaleway/resource_redis_cluster.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ func ResourceScalewayRedisCluster() *schema.Resource {
165165
},
166166
// Computed
167167
"public_network": {
168-
Type: schema.TypeList,
169-
Optional: true,
170-
Computed: true,
171-
MaxItems: 1,
168+
Type: schema.TypeList,
169+
//Optional: true,
170+
Computed: true,
171+
//MaxItems: 1,
172172
Description: "Public network specs details",
173173
Elem: &schema.Resource{
174174
Schema: map[string]*schema.Schema{

0 commit comments

Comments
 (0)