Skip to content

Commit e8f7449

Browse files
author
ljacobsson
committed
removing logs policy
1 parent a1ebb39 commit e8f7449

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mhlabs/evb-cli",
3-
"version": "1.1.48",
3+
"version": "1.1.49",
44
"description": "A package for building EventBridge/CloudWatch Events patterns",
55
"main": "index.js",
66
"scripts": {

src/commands/pipes/pipe-builder.js

+3-20
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ async function build(command) {
88
const templateName = cmd.template;
99
const template = templateParser.load(templateName, true);
1010
if (!template) {
11-
console.log(`Template "${templateName}" does not exist or could not be parsed.`);
11+
console.log(`Template "${templateName}" does not exist or could not be parsed. Please use the '--template <file-path>' option to use another file.`);
1212
return;
1313
}
1414
const compatibleSources = await getSources(template);
@@ -34,7 +34,7 @@ async function build(command) {
3434
target = { type: type, arn: arn, name: type.split(":")[1] }
3535
}
3636
const targetConfig = supportedTypes.find(p => p.Type === target.type);
37-
const targetObj = await buildParametersForSide(targetConfig.TargetSchemaName);
37+
const targetObj = await buildParametersForSide(targetConfig.TargetSchemaName);
3838
const sourcePropertyName = sourceConfig.SourceSchemaName.replace("PipeSource", "");
3939
const targetPropertyName = targetConfig.TargetSchemaName.replace("PipeTarget", "");
4040
const pipeName = `${source.name}To${target.name}Pipe`;
@@ -75,24 +75,7 @@ async function build(command) {
7575
}
7676
]
7777
},
78-
Policies: [
79-
{
80-
PolicyName: "LogsPolicy",
81-
PolicyDocument: {
82-
Version: "2012-10-17",
83-
Statement: [
84-
{
85-
Effect: "Allow",
86-
Action: [
87-
"logs:CreateLogStream",
88-
"logs:CreateLogGroup",
89-
"logs:PutLogEvents"],
90-
Resource: "*"
91-
},
92-
],
93-
}
94-
}
95-
]
78+
Policies: []
9679
}
9780
};
9881
sourceConfig.SourcePolicy.Statement[0].Resource = source.arn || JSON.parse(JSON.stringify((sourceConfig.SourcePolicy.Statement[0].Resource || sourceConfig.ArnGetter)).replace(/#RESOURCE_NAME#/g, source.name));

0 commit comments

Comments
 (0)