File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
packages/@aws-cdk/integ-runner/lib Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -264,7 +264,12 @@ export class ToolkitLibRunnerEngine implements ICdk {
264264 *
265265 * This catches that misconfiguration.
266266 */
267- private async validateRegion ( asm : IReadableCloudAssembly ) {
267+ private async validateRegion ( asm : IReadableCloudAssembly ) : Promise < void > {
268+ // this happens for existing snapshots, in that case nothing to check
269+ if ( this . options . region === UNKNOWN_REGION ) {
270+ return ;
271+ }
272+
268273 for ( const stack of asm . cloudAssembly . stacksRecursively ) {
269274 if ( stack . environment . region !== this . options . region && stack . environment . region !== UNKNOWN_REGION ) {
270275 this . ioHost . notify ( {
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as path from 'path';
22import type { WritableOptions } from 'stream' ;
33import { Writable } from 'stream' ;
44import { StringDecoder } from 'string_decoder' ;
5+ import { UNKNOWN_REGION } from '@aws-cdk/cloud-assembly-api' ;
56import type { ResourceDifference } from '@aws-cdk/cloudformation-diff' ;
67import { fullDiff , formatDifferences , ResourceImpact } from '@aws-cdk/cloudformation-diff' ;
78import { AssemblyManifestReader } from './private/cloud-assembly' ;
@@ -37,7 +38,7 @@ export class IntegSnapshotRunner extends IntegRunner {
3738 constructor ( options : Omit < IntegRunnerOptions , 'region' > ) {
3839 super ( {
3940 ...options ,
40- region : 'unused' ,
41+ region : UNKNOWN_REGION ,
4142 } ) ;
4243 }
4344
You can’t perform that action at this time.
0 commit comments