Skip to content

Commit

Permalink
removing logs policy
Browse files Browse the repository at this point in the history
  • Loading branch information
ljacobsson committed Dec 15, 2022
1 parent a1ebb39 commit e8f7449
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mhlabs/evb-cli",
"version": "1.1.48",
"version": "1.1.49",
"description": "A package for building EventBridge/CloudWatch Events patterns",
"main": "index.js",
"scripts": {
Expand Down
23 changes: 3 additions & 20 deletions src/commands/pipes/pipe-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async function build(command) {
const templateName = cmd.template;
const template = templateParser.load(templateName, true);
if (!template) {
console.log(`Template "${templateName}" does not exist or could not be parsed.`);
console.log(`Template "${templateName}" does not exist or could not be parsed. Please use the '--template <file-path>' option to use another file.`);
return;
}
const compatibleSources = await getSources(template);
Expand All @@ -34,7 +34,7 @@ async function build(command) {
target = { type: type, arn: arn, name: type.split(":")[1] }
}
const targetConfig = supportedTypes.find(p => p.Type === target.type);
const targetObj = await buildParametersForSide(targetConfig.TargetSchemaName);
const targetObj = await buildParametersForSide(targetConfig.TargetSchemaName);
const sourcePropertyName = sourceConfig.SourceSchemaName.replace("PipeSource", "");
const targetPropertyName = targetConfig.TargetSchemaName.replace("PipeTarget", "");
const pipeName = `${source.name}To${target.name}Pipe`;
Expand Down Expand Up @@ -75,24 +75,7 @@ async function build(command) {
}
]
},
Policies: [
{
PolicyName: "LogsPolicy",
PolicyDocument: {
Version: "2012-10-17",
Statement: [
{
Effect: "Allow",
Action: [
"logs:CreateLogStream",
"logs:CreateLogGroup",
"logs:PutLogEvents"],
Resource: "*"
},
],
}
}
]
Policies: []
}
};
sourceConfig.SourcePolicy.Statement[0].Resource = source.arn || JSON.parse(JSON.stringify((sourceConfig.SourcePolicy.Statement[0].Resource || sourceConfig.ArnGetter)).replace(/#RESOURCE_NAME#/g, source.name));
Expand Down

0 comments on commit e8f7449

Please sign in to comment.