@@ -108,7 +108,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
108108 }
109109
110110 // 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 )
112112 if err != nil {
113113 return err
114114 }
@@ -118,7 +118,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
118118
119119 // Fill in default payload, if needed
120120 if model .Payload == nil {
121- defaultPayload , err := skeUtils .GetDefaultPayload (ctx , apiClient )
121+ defaultPayload , err := skeUtils .GetDefaultPayload (ctx , apiClient , model . Region )
122122 if err != nil {
123123 return fmt .Errorf ("get default payload: %w" , err )
124124 }
@@ -137,7 +137,7 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
137137 if ! model .Async {
138138 s := spinner .New (params .Printer )
139139 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 )
141141 if err != nil {
142142 return fmt .Errorf ("wait for SKE cluster creation: %w" , err )
143143 }
@@ -192,7 +192,7 @@ func parseInput(p *print.Printer, cmd *cobra.Command, inputArgs []string) (*inpu
192192}
193193
194194func 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 )
196196
197197 req = req .CreateOrUpdateClusterPayload (* model .Payload )
198198 return req
0 commit comments