Skip to content

Commit

Permalink
fix(servicecatalog): Make possible to have assets in several products…
Browse files Browse the repository at this point in the history
… in the same portfolio (#25189)

Check for the existing AssetDeploymentBucket and if it is, use it otherwise create a new one
  • Loading branch information
Viktar Khomich committed Aug 8, 2023
1 parent 51c6272 commit 0431fd9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class ProductStackSynthesizer extends cdk.StackSynthesizer {
cdk.Annotations.of(parentStack).addWarning('[WARNING] Bucket Policy Permissions cannot be added to' +
' referenced Bucket. Please make sure your bucket has the correct permissions');
}
this.bucketDeployment = new BucketDeployment(parentStack, `${cdk.Names.uniqueId(this.boundStack)}-AssetsBucketDeployment`, {
this.bucketDeployment = (parentStack.node.findChild('AssetsBucketDeployment') as BucketDeployment) ?? new BucketDeployment(parentStack, `${cdk.Names.uniqueId(this.boundStack)}-AssetsBucketDeployment`, {
sources: [Source.asset(assetPath)],
destinationBucket: this.assetBucket,
extract: false,
Expand Down

0 comments on commit 0431fd9

Please sign in to comment.