Skip to content

Commit

Permalink
fix: check in custom policies for api and function (#8568)
Browse files Browse the repository at this point in the history
* fix: check in custom policies for api and function

* refactor: pr comments (if -> return)
  • Loading branch information
ammarkarachi committed Oct 26, 2021
1 parent 60255ee commit d932f7b
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -26,6 +26,10 @@ export async function preProcessCFNTemplate(filePath: string): Promise<string> {

//get data from custom polcies file and write custom policies to CFN template
export async function writeCustomPoliciesToCFNTemplate(resourceName: string, service: string, cfnFile: string, category: string) {
if ((category !== 'api' && service !== 'ElasticContainer') || (category !== 'function' && service !== 'Lambda')) {
return;
}

const resourceDir = pathManager.getResourceDirectoryPath(undefined, category, resourceName);
const cfnPath = path.join(resourceDir, cfnFile);
const { templateFormat, cfnTemplate } = await readCFNTemplate(cfnPath);
Expand Down

0 comments on commit d932f7b

Please sign in to comment.