From bf640f3276006c0f1a9ea494528fb7dfd0cf19bc Mon Sep 17 00:00:00 2001 From: VajralaVenkateswarlu Date: Tue, 4 Nov 2025 11:39:19 +0530 Subject: [PATCH 1/2] Add support for nested stack change set creation --- src/deploy.ts | 4 +++- src/main.ts | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/deploy.ts b/src/deploy.ts index 0eacbf6..9da929f 100644 --- a/src/deploy.ts +++ b/src/deploy.ts @@ -152,7 +152,8 @@ export async function deployStack( changeSetName: string, noEmptyChangeSet: boolean, noExecuteChangeSet: boolean, - noDeleteFailedChangeSet: boolean + noDeleteFailedChangeSet: boolean, + includeNestedStacksChangeSet: boolean = false ): Promise { const stack = await getStack(cfn, params.StackName) @@ -202,6 +203,7 @@ export async function deployStack( RoleARN: params.RoleARN, RollbackConfiguration: params.RollbackConfiguration, NotificationARNs: params.NotificationARNs, + IncludeNestedStacks: params.IncludeNestedStacks, Tags: params.Tags } }, diff --git a/src/main.ts b/src/main.ts index 45109c9..0c83495 100644 --- a/src/main.ts +++ b/src/main.ts @@ -22,6 +22,7 @@ import { NodeHttpHandler } from '@smithy/node-http-handler' // Validated by core.getInput() which throws if not set export type CreateStackInputWithName = CreateStackCommandInput & { StackName: string + IncludeNestedStacksChangeSet?: boolean } export type CreateChangeSetInput = CreateChangeSetCommandInput @@ -105,6 +106,9 @@ export async function run(): Promise { required: false }) ) + const includeNestedStacksChangeSet = !!+core.getInput('include-nested-stacks-change-set', { + required: false + }) // Configures proxy const agent = configureProxy(httpProxy) @@ -148,7 +152,8 @@ export async function run(): Promise { TemplateBody: templateBody, TemplateURL: templateUrl, Tags: tags, - EnableTerminationProtection: terminationProtections + EnableTerminationProtection: terminationProtections, + IncludeNestedStacksChangeSet: includeNestedStacksChangeSet } if (parameterOverrides) { From 3bf97f1b8bda0ead69db87d47197fb7e6d7d9668 Mon Sep 17 00:00:00 2001 From: VajralaVenkateswarlu Date: Tue, 4 Nov 2025 11:48:39 +0530 Subject: [PATCH 2/2] Refactor --- src/deploy.ts | 5 ++--- src/main.ts | 9 ++++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/deploy.ts b/src/deploy.ts index 9da929f..af98f7d 100644 --- a/src/deploy.ts +++ b/src/deploy.ts @@ -152,8 +152,7 @@ export async function deployStack( changeSetName: string, noEmptyChangeSet: boolean, noExecuteChangeSet: boolean, - noDeleteFailedChangeSet: boolean, - includeNestedStacksChangeSet: boolean = false + noDeleteFailedChangeSet: boolean ): Promise { const stack = await getStack(cfn, params.StackName) @@ -203,7 +202,7 @@ export async function deployStack( RoleARN: params.RoleARN, RollbackConfiguration: params.RollbackConfiguration, NotificationARNs: params.NotificationARNs, - IncludeNestedStacks: params.IncludeNestedStacks, + IncludeNestedStacks: params.IncludeNestedStacksChangeSet, Tags: params.Tags } }, diff --git a/src/main.ts b/src/main.ts index 0c83495..c33216b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -106,9 +106,12 @@ export async function run(): Promise { required: false }) ) - const includeNestedStacksChangeSet = !!+core.getInput('include-nested-stacks-change-set', { - required: false - }) + const includeNestedStacksChangeSet = !!+core.getInput( + 'include-nested-stacks-change-set', + { + required: false + } + ) // Configures proxy const agent = configureProxy(httpProxy)