Skip to content

Commit

Permalink
fix: addressed pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AmmarKarachi committed Oct 7, 2021
1 parent 5600064 commit 5e962ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -498,17 +498,19 @@ export abstract class ContainersStack extends cdk.Stack {
return `https://${region}.console.aws.amazon.com/codesuite/codepipeline/pipelines/${pipelineName}/view`;
}
toCloudFormation() {
this.node.findAll().forEach(construct => {
if (construct instanceof CfnFunction) {
const lambdaFunction = construct as CfnFunction;
this.node
.findAll()
.filter(construct => construct instanceof CfnFunction)
.map(construct => construct as CfnFunction)
.forEach(lambdaFunction => {
if (lambdaFunction.logicalId.includes('AwaiterMyProvider')) {
lambdaFunction.code = {
s3Bucket: this.deploymentBucketName,
s3Key: this.awaiterS3Key,
};
}
}
});
});

prepareApp(this);

const cfn = this._toCloudFormation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ async function formNestedStack(
}
}

if (category === 'api' && resourceDetails.service === ApiServiceNameElasticContainer) {
if ((category === 'api' || category === 'hosting') && resourceDetails.service === ApiServiceNameElasticContainer) {
parameters['deploymentBucketName'] = Fn.Ref('DeploymentBucketName');
parameters['rootStackName'] = Fn.Ref('AWS::StackName');
}
Expand Down

0 comments on commit 5e962ef

Please sign in to comment.