diff --git a/packages/@aws-cdk/toolkit/lib/actions/deploy.ts b/packages/@aws-cdk/toolkit/lib/actions/deploy.ts index 3373585a5600e..3782d0eb2014d 100644 --- a/packages/@aws-cdk/toolkit/lib/actions/deploy.ts +++ b/packages/@aws-cdk/toolkit/lib/actions/deploy.ts @@ -1,6 +1,7 @@ import { Deployments } from 'aws-cdk/lib/api/deployments'; import { WorkGraph } from 'aws-cdk/lib/util/work-graph'; import { StackSelector } from '../types'; +import { StackActivityProgress } from 'aws-cdk/lib/api/util/cloudformation/stack-activity-monitor'; export type DeploymentMethod = DirectDeploymentMethod | ChangeSetDeploymentMethod; @@ -234,6 +235,13 @@ export interface DeployOptions extends BaseDeployOptions { * @deprecated Implement in IoHost instead */ readonly ci?: boolean; + + /** + * Display mode for stack deployment progress. + * + * @deprecated Implement in IoHost instead + */ + readonly progress?: StackActivityProgress; } export function buildParameterMap(parameters?: Map): { [name: string]: { [name: string]: string | undefined } } { diff --git a/packages/@aws-cdk/toolkit/lib/toolkit.ts b/packages/@aws-cdk/toolkit/lib/toolkit.ts index a5c997d768fd0..61d1ad38d95c9 100644 --- a/packages/@aws-cdk/toolkit/lib/toolkit.ts +++ b/packages/@aws-cdk/toolkit/lib/toolkit.ts @@ -230,16 +230,17 @@ export class Toolkit { return; } - if (requireApproval !== RequireApproval.Never) { - const currentTemplate = await this.props.deployments.readCurrentTemplate(stack); - if (printSecurityDiff(currentTemplate, stack, requireApproval)) { - await askUserConfirmation( - concurrency, - '"--require-approval" is enabled and stack includes security-sensitive updates', - 'Do you wish to deploy these changes', - ); - } - } + // @TODO + // if (requireApproval !== RequireApproval.NEVER) { + // const currentTemplate = await deployments.readCurrentTemplate(stack); + // if (printSecurityDiff(currentTemplate, stack, requireApproval)) { + // await askUserConfirmation( + // concurrency, + // '"--require-approval" is enabled and stack includes security-sensitive updates', + // 'Do you wish to deploy these changes', + // ); + // } + // } // Following are the same semantics we apply with respect to Notification ARNs (dictated by the SDK) // @@ -384,7 +385,7 @@ export class Toolkit { ); } finally { if (options.cloudWatchLogMonitor) { - const foundLogGroupsResult = await findCloudWatchLogGroups(this.props.sdkProvider, stack); + const foundLogGroupsResult = await findCloudWatchLogGroups(await this.sdkProvider('deploy'), stack); options.cloudWatchLogMonitor.addLogGroups( foundLogGroupsResult.env, foundLogGroupsResult.sdk, @@ -457,6 +458,7 @@ export class Toolkit { const ioHost = withAction(this.ioHost, 'rollback'); throw new Error('Not implemented yet'); } + /** * Destroy Action * @@ -484,7 +486,7 @@ export class Toolkit { } for (const [index, stack] of stacks.stackArtifacts.entries()) { - await ioHost.notify(success('%s: destroying... [%s/%s]', chalk.blue(stack.displayName), index + 1, stacks.stackCount)); + await ioHost.notify(success(`${chalk.blue(stack.displayName)}: destroying... [${index + 1}/${stacks.stackCount}]`)); try { const deployments = await this.deploymentsForAction(action); await deployments.destroyStack({ @@ -493,9 +495,9 @@ export class Toolkit { roleArn: options.roleArn, ci: options.ci, }); - await ioHost.notify(success(`\n ✅ %s: ${action}ed`, chalk.blue(stack.displayName))); + await ioHost.notify(success(`\n ✅ ${chalk.blue(stack.displayName)}: ${action}ed`)); } catch (e) { - await ioHost.notify(error(`\n ❌ %s: ${action} failed`, chalk.blue(stack.displayName), e)); + await ioHost.notify(error(`\n ❌ ${chalk.blue(stack.displayName)}: ${action} failed ${e}`)); throw e; } }