@@ -24,7 +24,7 @@ type SSHInput struct {
2424 Project * client.Project
2525 EnvironmentIDs []string
2626 Ephemeral bool `cli:"ephemeral"`
27- Size string `cli:"size "`
27+ Plan string `cli:"plan "`
2828
2929 Args []string
3030}
@@ -48,9 +48,9 @@ func handleSSHError(err error) error {
4848// createEphemeralShell creates an ephemeral shell pod for the given service
4949// and returns the ephemeral shell id from the API response (empty string if
5050// the response did not include one). This must be called before SSH'ing into
51- // an ephemeral shell. If size is non-empty, it is sent as the requested
51+ // an ephemeral shell. If plan is non-empty, it is sent as the requested
5252// instance plan name.
53- func createEphemeralShell (ctx context.Context , serviceID , size string ) (string , error ) {
53+ func createEphemeralShell (ctx context.Context , serviceID , plan string ) (string , error ) {
5454 apiCfg , err := config .DefaultAPIConfig ()
5555 if err != nil {
5656 return "" , fmt .Errorf ("failed to get API config: %w" , err )
@@ -59,8 +59,8 @@ func createEphemeralShell(ctx context.Context, serviceID, size string) (string,
5959 url := fmt .Sprintf ("%sservices/%s/ephemeral-shell" , apiCfg .Host , serviceID )
6060
6161 var reqBody io.Reader = bytes .NewReader (nil )
62- if size != "" {
63- payload , err := json .Marshal (client.CreateEphemeralShellJSONRequestBody {Size : & size })
62+ if plan != "" {
63+ payload , err := json .Marshal (client.CreateEphemeralShellJSONRequestBody {Plan : & plan })
6464 if err != nil {
6565 return "" , fmt .Errorf ("failed to encode request body: %w" , err )
6666 }
@@ -74,7 +74,7 @@ func createEphemeralShell(ctx context.Context, serviceID, size string) (string,
7474
7575 req .Header = client .AddHeaders (req .Header , apiCfg .Key )
7676 req .Header .Set ("Accept" , "application/json" )
77- if size != "" {
77+ if plan != "" {
7878 req .Header .Set ("Content-Type" , "application/json" )
7979 }
8080
@@ -199,16 +199,16 @@ func loadDataSSH(ctx context.Context, in *SSHInput) (*exec.Cmd, error) {
199199 }
200200 }
201201
202- if in .Size != "" && ! in .Ephemeral {
202+ if in .Plan != "" && ! in .Ephemeral {
203203 return nil , tui.UserFacingError {
204204 Title : "Invalid flags" ,
205- Message : "--size is only supported with --ephemeral." ,
205+ Message : "--plan is only supported with --ephemeral." ,
206206 }
207207 }
208208
209209 if in .Ephemeral {
210210 // Create the ephemeral shell pod first
211- shellID , err := createEphemeralShell (ctx , serviceInfo .Id , in .Size )
211+ shellID , err := createEphemeralShell (ctx , serviceInfo .Id , in .Plan )
212212 if err != nil {
213213 return nil , tui.UserFacingError {
214214 Title : "Failed to create ephemeral shell" ,
0 commit comments