@@ -83,8 +83,19 @@ def zip(path: str):
8383@click .option ("--name" , required = True )
8484@click .option ("--version" , default = "0.0.1" )
8585@click .option ("--description" , default = "Custom Data Transform Code" )
86- @click .option ("--compute-type" , default = "CPU_2XL" )
87- def deploy (path : str , name : str , version : str , description : str , compute_type : str ):
86+ @click .option (
87+ "--cpu-size" ,
88+ default = "CPU_2XL" ,
89+ help = """CPU size for deployment. Available options:
90+
91+ CPU_L - Large CPU instance
92+ CPU_XL - X-Large CPU instance
93+ CPU_2XL - 2X-Large CPU instance [DEFAULT]
94+ CPU_4XL - 4X-Large CPU instance
95+
96+ Choose based on your workload requirements.""" ,
97+ )
98+ def deploy (path : str , name : str , version : str , description : str , cpu_size : str ):
8899 from datacustomcode .credentials import Credentials
89100 from datacustomcode .deploy import TransformationJobMetadata , deploy_full
90101
@@ -93,21 +104,21 @@ def deploy(path: str, name: str, version: str, description: str, compute_type: s
93104 # Validate compute type
94105 from datacustomcode .deploy import COMPUTE_TYPES
95106
96- if compute_type not in COMPUTE_TYPES .keys ():
107+ if cpu_size not in COMPUTE_TYPES .keys ():
97108 click .secho (
98- f"Error: Invalid compute type '{ compute_type } '. "
109+ f"Error: Invalid CPU size '{ cpu_size } '. "
99110 f"Available options: { ', ' .join (COMPUTE_TYPES .keys ())} " ,
100111 fg = "red" ,
101112 )
102113 raise click .Abort ()
103114
104- logger .info (f"Deploying with compute type : { compute_type } " )
115+ logger .debug (f"Deploying with CPU size : { cpu_size } " )
105116
106117 metadata = TransformationJobMetadata (
107118 name = name ,
108119 version = version ,
109120 description = description ,
110- computeType = COMPUTE_TYPES [compute_type ],
121+ computeType = COMPUTE_TYPES [cpu_size ],
111122 )
112123 try :
113124 credentials = Credentials .from_available ()
0 commit comments