Skip to content

Commit

Permalink
fix correct type
Browse files Browse the repository at this point in the history
  • Loading branch information
zirkelc committed Oct 16, 2024
1 parent 05b9f6b commit 87ec7fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ServerlessCloudWatchLogsInsightsPlugin implements Plugin {
this.config.cloudwatchLogsInsights.queries.forEach((queryDef, index) => {
const queryLogicalId = `LogsInsightsQuery${index}`;
template.Resources[queryLogicalId] = {
Type: 'AWS::CloudWatch::QueryDefinition',
Type: 'AWS::Logs::QueryDefinition',
Properties: {
Name: queryDef.name,
QueryString: queryDef.query,
Expand Down
6 changes: 3 additions & 3 deletions test/serverless.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('should generate CloudWatch Logs Insights queries for all functions', (
const query2 = template.Resources[queryLogicalId2];

expect(query0).toEqual({
Type: 'AWS::CloudWatch::QueryDefinition',
Type: 'AWS::Logs::QueryDefinition',
Properties: {
LogGroupNames: [
'/aws/lambda/acme-service-dev-foo',
Expand All @@ -78,7 +78,7 @@ describe('should generate CloudWatch Logs Insights queries for all functions', (
});

expect(query1).toEqual({
Type: 'AWS::CloudWatch::QueryDefinition',
Type: 'AWS::Logs::QueryDefinition',
Properties: {
LogGroupNames: [
'/aws/lambda/acme-service-dev-foo',
Expand All @@ -92,7 +92,7 @@ describe('should generate CloudWatch Logs Insights queries for all functions', (
});

expect(query2).toEqual({
Type: 'AWS::CloudWatch::QueryDefinition',
Type: 'AWS::Logs::QueryDefinition',
Properties: {
LogGroupNames: [
'/aws/lambda/acme-service-dev-foo',
Expand Down

0 comments on commit 87ec7fd

Please sign in to comment.