Skip to content

Commit

Permalink
fix(rules): add AWS MQ
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Sep 18, 2023
1 parent 5ce7f80 commit 582da18
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 1 deletion.
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 @@ -39,6 +39,7 @@ exports[`all > should match everything 1`] = `
"aws.glacier",
"aws.lambda",
"aws.lightsail",
"aws.mq",
"aws.neptune",
"aws.opensearch",
"aws.rds",
Expand Down
19 changes: 19 additions & 0 deletions src/rules/messaging/aws.mq.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { register } from '../../register.js';

register({
tech: 'aws.mq',
name: 'AWS MQ',
type: 'messaging',
dependencies: [
{ type: 'npm', name: '@aws-cdk/aws-mq' },
{ type: 'npm', name: '@aws-sdk/client-mq' },
{ type: 'rust', name: 'aws-sdk-mq' },
{ type: 'ruby', name: 'aws-sdk-mq' },
{ type: 'golang', name: 'github.com/aws/aws-sdk-go-v2/service/mq' },
{
type: 'terraform.resource',
name: /^aws_mq_/,
example: 'aws_mq_broker',
},
],
});
2 changes: 1 addition & 1 deletion src/rules/messaging/aws.sqs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { register } from '../../register.js';

register({
tech: 'aws.sqs',
name: 'SQS',
name: 'AWS SQS',
type: 'messaging',
dependencies: [
{ type: 'npm', name: '@aws-cdk/aws-sqs' },
Expand Down
1 change: 1 addition & 0 deletions src/rules/messaging/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import './apache_kafka.js';
import './aws.mq.js';
import './aws.sns.js';
import './aws.sqs.js';
import './gcp.pubsub.js';
Expand Down
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 @@ -16,6 +16,7 @@ exports[`golang (lockfile) > should match everything 1`] = `
"aws.glacier",
"aws.lambda",
"aws.lightsail",
"aws.mq",
"aws.neptune",
"aws.opensearch",
"aws.rds",
Expand Down Expand Up @@ -286,6 +287,11 @@ exports[`golang (lockfile) > should match everything 2`] = `
"github.com/aws/aws-sdk-go-v2/service/lightsail",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/mq",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/neptune",
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 @@ -24,6 +24,7 @@ exports[`npm > should match everything 1`] = `
"aws.glacier",
"aws.lambda",
"aws.lightsail",
"aws.mq",
"aws.neptune",
"aws.opensearch",
"aws.rds",
Expand Down Expand Up @@ -271,6 +272,11 @@ exports[`npm > should match everything 2`] = `
"@aws-cdk/aws-lightsail",
"0.0.0",
],
[
"npm",
"@aws-cdk/aws-mq",
"0.0.0",
],
[
"npm",
"@aws-cdk/aws-neptune",
Expand Down Expand Up @@ -381,6 +387,11 @@ exports[`npm > should match everything 2`] = `
"@aws-sdk/client-lightsail",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-mq",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-neptune",
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 @@ -18,6 +18,7 @@ exports[`ruby (component) > should match everything 1`] = `
"aws.glacier",
"aws.lambda",
"aws.lightsail",
"aws.mq",
"aws.neptune",
"aws.opensearch",
"aws.rds",
Expand Down Expand Up @@ -212,6 +213,11 @@ exports[`ruby (component) > should match everything 2`] = `
"aws-sdk-lightsail",
"1.0.0",
],
[
"ruby",
"aws-sdk-mq",
"1.0.0",
],
[
"ruby",
"aws-sdk-neptune",
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 @@ -20,6 +20,7 @@ exports[`rust (component) > should match everything 1`] = `
"aws.glacier",
"aws.lambda",
"aws.lightsail",
"aws.mq",
"aws.neptune",
"aws.opensearch",
"aws.rds",
Expand Down Expand Up @@ -157,6 +158,11 @@ exports[`rust (component) > should match everything 2`] = `
"aws-sdk-lightsail",
"1.0.0",
],
[
"rust",
"aws-sdk-mq",
"1.0.0",
],
[
"rust",
"aws-sdk-neptune",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ exports[`terraform (resource) > should match everything 1`] = `
"aws.glacier",
"aws.lambda",
"aws.lightsail",
"aws.mq",
"aws.neptune",
"aws.opensearch",
"aws.rds",
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export type AllowedKeys =
| 'aws.glacier'
| 'aws.lambda'
| 'aws.lightsail'
| 'aws.mq'
| 'aws.neptune'
| 'aws.opensearch'
| 'aws.rds'
Expand Down

0 comments on commit 582da18

Please sign in to comment.