From 8c925cf91c4e32897fb3075cb958c70e719c9555 Mon Sep 17 00:00:00 2001 From: seven Date: Tue, 3 Dec 2024 23:18:12 +0800 Subject: [PATCH] fix: name resolve issue Signed-off-by: seven --- src/stack/iacStack.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/stack/iacStack.ts b/src/stack/iacStack.ts index fe5115a9..ed08f8eb 100644 --- a/src/stack/iacStack.ts +++ b/src/stack/iacStack.ts @@ -44,15 +44,15 @@ export class IacStack extends ros.Stack { new ros.RosMapping(this, 'stages', { mapping: replaceReference(iac.stages, context) }); } - new ros.RosInfo( - this, - ros.RosInfo.description, - replaceReference(`${this.service} stack`, context), - ); + new ros.RosInfo(this, ros.RosInfo.description, `${this.service} stack`); const fileSources = iac.functions .filter(({ code }) => readCodeSize(code) > CODE_ZIP_SIZE_LIMIT) - .map(({ code, name }) => ({ fcName: name, ...getFileSource(name, code) })); + .map(({ code, name }) => { + const fcName = replaceReference(name, context); + + return { fcName, ...getFileSource(fcName, code) }; + }); let destinationBucket: oss.Bucket; if (fileSources.length > 0) { @@ -61,7 +61,7 @@ export class IacStack extends ros.Stack { this, replaceReference(`${this.service}_artifacts_bucket`, context), { - bucketName: replaceReference(`${this.service}-artifacts-bucket`, context), + bucketName: `${this.service}-artifacts-bucket`, serverSideEncryptionConfiguration: { sseAlgorithm: 'KMS' }, }, true,