@@ -108,7 +108,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
108
108
}
109
109
110
110
// Check if cluster exists
111
- exists , err := skeUtils .ClusterExists (ctx , apiClient , model .ProjectId , model .ClusterName )
111
+ exists , err := skeUtils .ClusterExists (ctx , apiClient , model .ProjectId , model .Region , model . ClusterName )
112
112
if err != nil {
113
113
return err
114
114
}
@@ -118,7 +118,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
118
118
119
119
// Fill in default payload, if needed
120
120
if model .Payload == nil {
121
- defaultPayload , err := skeUtils .GetDefaultPayload (ctx , apiClient )
121
+ defaultPayload , err := skeUtils .GetDefaultPayload (ctx , apiClient , model . Region )
122
122
if err != nil {
123
123
return fmt .Errorf ("get default payload: %w" , err )
124
124
}
@@ -137,7 +137,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
137
137
if ! model .Async {
138
138
s := spinner .New (params .Printer )
139
139
s .Start ("Creating cluster" )
140
- _ , err = wait .CreateOrUpdateClusterWaitHandler (ctx , apiClient , model .ProjectId , name ).WaitWithContext (ctx )
140
+ _ , err = wait .CreateOrUpdateClusterWaitHandler (ctx , apiClient , model .ProjectId , model . Region , name ).WaitWithContext (ctx )
141
141
if err != nil {
142
142
return fmt .Errorf ("wait for SKE cluster creation: %w" , err )
143
143
}
@@ -192,7 +192,7 @@ func parseInput(p *print.Printer, cmd *cobra.Command, inputArgs []string) (*inpu
192
192
}
193
193
194
194
func buildRequest (ctx context.Context , model * inputModel , apiClient * ske.APIClient ) ske.ApiCreateOrUpdateClusterRequest {
195
- req := apiClient .CreateOrUpdateCluster (ctx , model .ProjectId , model .ClusterName )
195
+ req := apiClient .CreateOrUpdateCluster (ctx , model .ProjectId , model .Region , model . ClusterName )
196
196
197
197
req = req .CreateOrUpdateClusterPayload (* model .Payload )
198
198
return req
0 commit comments