Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a subset of properties for stackset stack manipulation #120

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion src/stackset-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,32 @@ export class StackSetStackSynthesizer extends StackSynthesizer {
}
}

/**
* Properties for a StackSet Deployment. Subset of normal Stack properties.
*/
interface StackSetStackProps {
arrjay marked this conversation as resolved.
Show resolved Hide resolved
/**
* Include runtime versioning information in this Stack
*
* @default `analyticsReporting` setting of containing `App`, or value of
* 'aws:cdk:version-reporting' context key
*/
readonly analyticsReporting?: boolean;

/**
* A description of the stack.
*
* @default - No description.
*/
readonly description?: string;

/**
* Stack tags that will be applied to all the taggable resources and the stack itself.
*
* @default {}
*/
readonly tags?: { [key: string]: string };
}

/**
* A StackSet stack, which is similar to a normal CloudFormation stack with
Expand All @@ -49,9 +75,10 @@ export class StackSetStack extends Stack {
public readonly templateFile: string;
private _templateUrl?: string;
private _parentStack: Stack;
constructor(scope: Construct, id: string) {
constructor(scope: Construct, id: string, props: StackSetStackProps) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
constructor(scope: Construct, id: string, props: StackSetStackProps) {
constructor(scope: Construct, id: string, props: StackSetStackProps = {}) {

Sorry 1 more. Since all the props are optional this should be optional as well.

super(scope, id, {
synthesizer: new StackSetStackSynthesizer(),
...props,
});

this._parentStack = findParentStack(scope);
Expand Down