Skip to content

Commit

Permalink
allow data collection bucket not to exist (#667)
Browse files Browse the repository at this point in the history
  • Loading branch information
iakov-aws authored Nov 8, 2023
1 parent 21ce761 commit ce5c15e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cfn-templates/cid-cfn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -726,9 +726,9 @@ Resources:
s3path = s3path.replace('{account_id}', account_id)
parts = s3path.split('/')
data['Bucket'] = parts[0]
if not bucket_exists(data['Bucket']) and type_.lower() != 'delete':
raise Exception(f'Bucket {parts[0]} does not exist. Please check prerequisites. Just creating a bucket is not enough.')
if properties.get('type', '') == 'CUR':
if not bucket_exists(data['Bucket']) and type_.lower() != 'delete':
raise Exception(f'Bucket {parts[0]} does not exist. Please check prerequisites. Just creating a bucket is not enough.')
# detect Type of CUR and choose the right partitions structure
if len(parts[1:]) == 1: # most likely it is created by CFN or similar
data['Partitions'] = partitions['managed_by_cfn']
Expand Down

0 comments on commit ce5c15e

Please sign in to comment.