diff --git a/apps/collection/template.yaml b/apps/collection/template.yaml index 53037e85..f84f1953 100644 --- a/apps/collection/template.yaml +++ b/apps/collection/template.yaml @@ -19,7 +19,7 @@ Metadata: default: Required parameters Parameters: - DataAccessPointArn - - DestinationArn + - DestinationUri - Label: default: Components Parameters: @@ -74,6 +74,12 @@ Conditions: UseStackName: !Equals - !Ref NameOverride - "" + EmptySourceBucketNames: !Equals + - !Join [ ",", !Ref SourceBucketNames ] + - "" + EmptySourceTopicArns: !Equals + - !Join [ ",", !Ref SourceTopicArns ] + - "" Resources: Topic: @@ -140,8 +146,22 @@ Resources: Parameters: DataAccessPointArn: !Ref DataAccessPointArn DestinationUri: !Ref DestinationUri - SourceBucketNames: !Ref Bucket - SourceTopicArns: !Ref Topic + SourceBucketNames: !If + - EmptySourceBucketNames + - [ !Ref Bucket ] + - !Split + - "," + - !Sub + - "${Bucket},${buckets}" + - buckets: !Join [ ",", !Ref SourceBucketNames ] + SourceTopicArns: !If + - EmptySourceTopicArns + - [ !Ref Topic ] + - !Split + - "," + - !Sub + - "${Topic},${topics}" + - topics: !Join [ ",", !Ref SourceTopicArns ] NameOverride: !If - UseStackName - !Ref 'AWS::StackName'