File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed
deployments/cdk/src/common
lib/cdk-plugin-assume-role/src Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -196,12 +196,19 @@ export class AccountStacks {
196196 protected createStackLogicalId ( accountKey : string , region : string , suffix ?: string ) {
197197 // BE CAREFUL CHANGING THE STACK LOGICAL ID
198198 // When changed, it will generate new logical IDs for all resources in this stack and recreate all resources!
199- const accountPrettyName = pascalCase ( accountKey ) ;
199+ let accountPrettyName = pascalCase ( accountKey ) ;
200+ if ( this . startsWithNum ( accountPrettyName ) ) {
201+ accountPrettyName = `a${ accountPrettyName } ` ;
202+ }
200203 const suffixPretty = suffix ? pascalCase ( suffix ) : '' ;
201204 const regionPrettyName = region === this . props . context . defaultRegion ? '' : pascalCase ( region ) ;
202205 const stackConstructId = ! suffix
203206 ? `${ accountPrettyName } Phase${ this . props . phase } ${ regionPrettyName } `
204207 : `${ accountPrettyName } Phase${ this . props . phase } ${ regionPrettyName } ${ suffixPretty } ` ;
205208 return stackConstructId ;
206209 }
210+
211+ startsWithNum = ( expression : string ) => {
212+ return new RegExp ( / ^ \d / ) . test ( expression ) ;
213+ } ;
207214}
Original file line number Diff line number Diff line change @@ -368,9 +368,6 @@ export class Vpc extends cdk.Construct implements constructs.Vpc {
368368 availabilityZone,
369369 outpostArn : subnetDefinition [ 'outpost-arn' ] ,
370370 } ) ;
371- if ( availabilityZone . length > 1 ) {
372- console . log ( subnet ) ;
373- }
374371 for ( const extensions of extendVpc ) {
375372 subnet . addDependsOn ( extensions ) ;
376373 }
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export class AssumeRoleProviderSource implements CredentialProviderSource {
7171 endpoint = `sts.${ region } .amazonaws.com` ;
7272 }
7373 const sts = new aws . STS ( { endpoint, region } ) ;
74- const assumeRoleResponse = await throttlingBackOff ( ( ) =>
74+ return await throttlingBackOff ( ( ) =>
7575 sts
7676 . assumeRole ( {
7777 RoleArn : roleArn ,
@@ -80,8 +80,5 @@ export class AssumeRoleProviderSource implements CredentialProviderSource {
8080 } )
8181 . promise ( ) ,
8282 ) ;
83-
84- console . log ( assumeRoleResponse ) ;
85- return assumeRoleResponse ;
8683 }
8784}
You can’t perform that action at this time.
0 commit comments