@@ -56,6 +56,12 @@ type CreateInstanceResult struct {
56
56
Password string `json:"password"`
57
57
}
58
58
59
+ type rdbCreateInstanceRequestCustom struct {
60
+ * rdbSDK.CreateInstanceRequest
61
+ InitEndpoints []* rdbEndpointSpecCustom `json:"init-endpoints"`
62
+ GeneratePassword bool
63
+ }
64
+
59
65
func createInstanceResultMarshalerFunc (i interface {}, opt * human.MarshalOpt ) (string , error ) {
60
66
instanceResult := i .(CreateInstanceResult )
61
67
@@ -203,7 +209,7 @@ func autoCompleteNodeType(ctx context.Context, prefix string, request any) core.
203
209
}
204
210
205
211
func autoCompleteDatabaseEngines (ctx context.Context , prefix string , request any ) core.AutocompleteSuggestions {
206
- req := request .(* rdbSDK. CreateInstanceRequest )
212
+ req := request .(rdbCreateInstanceRequestCustom )
207
213
suggestion := core .AutocompleteSuggestions (nil )
208
214
client := core .ExtractClient (ctx )
209
215
api := rdbSDK .NewAPI (client )
@@ -228,12 +234,6 @@ func autoCompleteDatabaseEngines(ctx context.Context, prefix string, request any
228
234
}
229
235
230
236
func instanceCreateBuilder (c * core.Command ) * core.Command {
231
- type rdbCreateInstanceRequestCustom struct {
232
- * rdbSDK.CreateInstanceRequest
233
- InitEndpoints []* rdbEndpointSpecCustom `json:"init-endpoints"`
234
- GeneratePassword bool
235
- }
236
-
237
237
c .ArgSpecs .AddBefore ("init-endpoints.{index}.private-network.private-network-id" , & core.ArgSpec {
238
238
Name : "init-endpoints.{index}.load-balancer" ,
239
239
Short : "Will configure a load-balancer endpoint along with your private network endpoint if true" ,
0 commit comments