Skip to content

Commit

Permalink
fix(rules): add AWS CloudWatch
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Sep 18, 2023
1 parent a1c0299 commit 31e51f5
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/rules/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ exports[`all > should match everything 1`] = `
"aws.athena",
"aws.cloudfront",
"aws.cloudsearch",
"aws.cloudwatch",
"aws.codebuild",
"aws.documentdb",
"aws.dynamodb",
Expand Down
1 change: 1 addition & 0 deletions src/rules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import './etl/index.js';
import './hosting/index.js';
import './js/index.js';
import './messaging/index.js';
import './monitoring/index.js';
import './network/index.js';
import './php/index.js';
import './saas/index.js';
Expand Down
22 changes: 22 additions & 0 deletions src/rules/monitoring/aws.cloudwatch.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { register } from '../../register.js';

register({
tech: 'aws.cloudwatch',
name: 'AWS Cloudwatch',
type: 'monitoring',
dependencies: [
{ type: 'npm', name: '@aws-cdk/aws-cloudwatch' },
{ type: 'npm', name: '@aws-sdk/client-cloudwatch' },
{ type: 'rust', name: 'aws-sdk-cloudwatch' },
{ type: 'ruby', name: 'aws-sdk-cloudwatch' },
{
type: 'golang',
name: 'github.com/aws/aws-sdk-go-v2/service/cloudwatch',
},
{
type: 'terraform.resource',
name: /^aws_cloudwatch_/,
example: 'aws_cloudwatch_dashboard',
},
],
});
1 change: 1 addition & 0 deletions src/rules/monitoring/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './aws.cloudwatch.js';
6 changes: 6 additions & 0 deletions src/rules/spec/golang/__snapshots__/lockfile.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exports[`golang (lockfile) > should match everything 1`] = `
"aws.athena",
"aws.cloudfront",
"aws.cloudsearch",
"aws.cloudwatch",
"aws.documentdb",
"aws.dynamodb",
"aws.ebs",
Expand Down Expand Up @@ -236,6 +237,11 @@ exports[`golang (lockfile) > should match everything 2`] = `
"github.com/aws/aws-sdk-go-v2/service/cloudsearch",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/cloudwatch",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/codebuild",
Expand Down
11 changes: 11 additions & 0 deletions src/rules/spec/nodejs/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ exports[`npm > should match everything 1`] = `
"aws.athena",
"aws.cloudfront",
"aws.cloudsearch",
"aws.cloudwatch",
"aws.codebuild",
"aws.documentdb",
"aws.dynamodb",
Expand Down Expand Up @@ -231,6 +232,11 @@ exports[`npm > should match everything 2`] = `
"@aws-cdk/aws-cloudsearch",
"0.0.0",
],
[
"npm",
"@aws-cdk/aws-cloudwatch",
"0.0.0",
],
[
"npm",
"@aws-cdk/aws-docdb",
Expand Down Expand Up @@ -356,6 +362,11 @@ exports[`npm > should match everything 2`] = `
"@aws-sdk/client-cloudsearch",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-cloudwatch",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-codebuild",
Expand Down
6 changes: 6 additions & 0 deletions src/rules/spec/ruby/__snapshots__/lockfile.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ exports[`ruby (component) > should match everything 1`] = `
"aws.athena",
"aws.cloudfront",
"aws.cloudsearch",
"aws.cloudwatch",
"aws.documentdb",
"aws.dynamodb",
"aws.ebs",
Expand Down Expand Up @@ -152,6 +153,11 @@ exports[`ruby (component) > should match everything 2`] = `
"aws-sdk-cloudsearch",
"1.0.0",
],
[
"ruby",
"aws-sdk-cloudwatch",
"1.0.0",
],
[
"ruby",
"aws-sdk-codebuild",
Expand Down
6 changes: 6 additions & 0 deletions src/rules/spec/rust/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ exports[`rust (component) > should match everything 1`] = `
"aws.athena",
"aws.cloudfront",
"aws.cloudsearch",
"aws.cloudwatch",
"aws.codebuild",
"aws.documentdb",
"aws.dynamodb",
Expand Down Expand Up @@ -97,6 +98,11 @@ exports[`rust (component) > should match everything 2`] = `
"aws-sdk-cloudsearch",
"1.0.0",
],
[
"rust",
"aws-sdk-cloudwatch",
"1.0.0",
],
[
"rust",
"aws-sdk-codebuild",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports[`terraform (resource) > should match everything 1`] = `
"aws.athena",
"aws.cloudfront",
"aws.cloudsearch",
"aws.cloudwatch",
"aws.codebuild",
"aws.documentdb",
"aws.dynamodb",
Expand Down
2 changes: 2 additions & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type TechType =
| 'hosting'
| 'language'
| 'messaging'
| 'monitoring'
| 'network'
| 'saas'
| 'storage'
Expand Down Expand Up @@ -38,6 +39,7 @@ export type AllowedKeys =
| 'aws.athena'
| 'aws.cloudfront'
| 'aws.cloudsearch'
| 'aws.cloudwatch'
| 'aws.codebuild'
| 'aws.documentdb'
| 'aws.dynamodb'
Expand Down

0 comments on commit 31e51f5

Please sign in to comment.