-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into aws-iot-actions-logs
- Loading branch information
Showing
15 changed files
with
591 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
packages/@aws-cdk/aws-servicecatalog/lib/private/product-stack-synthesizer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import * as cdk from '@aws-cdk/core'; | ||
|
||
/** | ||
* Deployment environment for an AWS Service Catalog product stack. | ||
* | ||
* Interoperates with the StackSynthesizer of the parent stack. | ||
*/ | ||
export class ProductStackSynthesizer extends cdk.StackSynthesizer { | ||
private stack?: cdk.Stack; | ||
|
||
public bind(stack: cdk.Stack): void { | ||
if (this.stack !== undefined) { | ||
throw new Error('A Stack Synthesizer can only be bound once, create a new instance to use with a different Stack'); | ||
} | ||
this.stack = stack; | ||
} | ||
|
||
public addFileAsset(_asset: cdk.FileAssetSource): cdk.FileAssetLocation { | ||
throw new Error('Service Catalog Product Stacks cannot use Assets'); | ||
} | ||
|
||
public addDockerImageAsset(_asset: cdk.DockerImageAssetSource): cdk.DockerImageAssetLocation { | ||
throw new Error('Service Catalog Product Stacks cannot use Assets'); | ||
} | ||
|
||
public synthesize(session: cdk.ISynthesisSession): void { | ||
if (!this.stack) { | ||
throw new Error('You must call bindStack() first'); | ||
} | ||
// Synthesize the template, but don't emit as a cloud assembly artifact. | ||
// It will be registered as an S3 asset of its parent instead. | ||
this.synthesizeStackTemplate(this.stack, session); | ||
} | ||
} |
Oops, something went wrong.