99
1010
1111logger = logging .getLogger (__name__ )
12+ version = json .load (open ('data-collection/utils/version.json' ))['version' ]
1213
1314HEADER = '\033 [95m'
1415BLUE = '\033 [94m'
@@ -156,7 +157,7 @@ def deploy_stack(cloudformation, stack_name: str, url: str, parameters: list[dic
156157 TimeoutInMinutes = 60 ,
157158 ** options ,
158159 )
159- logger .info (f'{ stack_name } started creation strarted { res } ' )
160+ logger .info (f'{ stack_name } started creation started { res } ' )
160161 except cloudformation .exceptions .AlreadyExistsException :
161162 try :
162163 logger .info (f'{ stack_name } exists' )
@@ -178,7 +179,7 @@ def initial_deploy_stacks(cloudformation, account_id, org_unit_id, bucket):
178179 deploy_stack (
179180 cloudformation = cloudformation ,
180181 stack_name = f'{ PREFIX } OptimizationDataReadPermissionsStack' ,
181- url = f'https://{ bucket } .s3.amazonaws.com/cfn/data-collection/deploy-data-read-permissions.yaml' ,
182+ url = f'https://{ bucket } .s3.amazonaws.com/cfn/data-collection/v { version } / deploy-data-read-permissions.yaml' ,
182183 parameters = [
183184 {'ParameterKey' : 'CFNSourceBucket' , 'ParameterValue' : bucket },
184185 {'ParameterKey' : 'DataCollectionAccountID' , 'ParameterValue' : account_id },
@@ -207,7 +208,7 @@ def initial_deploy_stacks(cloudformation, account_id, org_unit_id, bucket):
207208 deploy_stack (
208209 cloudformation = cloudformation ,
209210 stack_name = f'{ PREFIX } OptimizationDataCollectionStack' ,
210- url = f'https://{ bucket } .s3.amazonaws.com/cfn/data-collection/deploy-data-collection.yaml' ,
211+ url = f'https://{ bucket } .s3.amazonaws.com/cfn/data-collection/v { version } / deploy-data-collection.yaml' ,
211212 parameters = [
212213 {'ParameterKey' : 'CFNSourceBucket' , 'ParameterValue' : bucket },
213214 {'ParameterKey' : 'RegionsInScope' , 'ParameterValue' : REGIONS },
0 commit comments