Skip to content

Commit

Permalink
fix(rules): add AWS Document DB
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Sep 17, 2023
1 parent 31efa1d commit 0034589
Show file tree
Hide file tree
Showing 9 changed files with 46 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 @@ -26,6 +26,7 @@ exports[`all > should match everything 1`] = `
"aws.amplify_hosting",
"aws.cloudfront",
"aws.codebuild",
"aws.documentdb",
"aws.dynamodb",
"aws.ebs",
"aws.ec2",
Expand Down
18 changes: 18 additions & 0 deletions src/rules/db/aws.documentdb.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { register } from '../../register.js';

register({
tech: 'aws.documentdb',
name: 'AWS Document DB',
type: 'db',
dependencies: [
{ type: 'npm', name: '@aws-sdk/client-docdb' },
{ type: 'rust', name: 'aws-sdk-docdb' },
{ type: 'ruby', name: 'aws-sdk-docdb' },
{ type: 'golang', name: 'github.com/aws/aws-sdk-go-v2/service/docdb' },
{
type: 'terraform.resource',
name: /^aws_docdb_/,
example: 'aws_docdb_cluster',
},
],
});
1 change: 1 addition & 0 deletions src/rules/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import './apache_cassandra.js';
import './apache_couchdb.js';
import './apache_iceberg.js';
import './apache_spark.js';
import './aws.documentdb.js';
import './aws.dynamodb.js';
import './aws.elasticache.js';
import './aws.neptune.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 @@ -4,6 +4,7 @@ exports[`golang (lockfile) > should match everything 1`] = `
[
"aws",
"aws.cloudfront",
"aws.documentdb",
"aws.dynamodb",
"aws.ebs",
"aws.ec2",
Expand Down Expand Up @@ -220,6 +221,11 @@ exports[`golang (lockfile) > should match everything 2`] = `
"github.com/aws/aws-sdk-go-v2/service/codebuild",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/docdb",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/dynamodb",
Expand Down
6 changes: 6 additions & 0 deletions src/rules/spec/nodejs/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ exports[`npm > should match everything 1`] = `
"aws.amplify_hosting",
"aws.cloudfront",
"aws.codebuild",
"aws.documentdb",
"aws.dynamodb",
"aws.ebs",
"aws.ec2",
Expand Down Expand Up @@ -235,6 +236,11 @@ exports[`npm > should match everything 2`] = `
"@aws-sdk/client-codebuild",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-docdb",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-dynamodb-streams",
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 @@ -6,6 +6,7 @@ exports[`ruby (component) > should match everything 1`] = `
"auth0",
"aws",
"aws.cloudfront",
"aws.documentdb",
"aws.dynamodb",
"aws.ebs",
"aws.ec2",
Expand Down Expand Up @@ -136,6 +137,11 @@ exports[`ruby (component) > should match everything 2`] = `
"aws-sdk-codebuild",
"1.0.0",
],
[
"ruby",
"aws-sdk-docdb",
"1.0.0",
],
[
"ruby",
"aws-sdk-dynamodbstreams",
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 @@ -8,6 +8,7 @@ exports[`rust (component) > should match everything 1`] = `
"aws",
"aws.cloudfront",
"aws.codebuild",
"aws.documentdb",
"aws.dynamodb",
"aws.ebs",
"aws.ec2",
Expand Down Expand Up @@ -81,6 +82,11 @@ exports[`rust (component) > should match everything 2`] = `
"aws-sdk-codebuild",
"1.0.0",
],
[
"rust",
"aws-sdk-docdb",
"1.0.0",
],
[
"rust",
"aws-sdk-dynamodb",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exports[`terraform (resource) > should match everything 1`] = `
"aws.amplify_hosting",
"aws.cloudfront",
"aws.codebuild",
"aws.documentdb",
"aws.dynamodb",
"aws.ebs",
"aws.ec2",
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export type AllowedKeys =
| 'aws.amplify_hosting'
| 'aws.cloudfront'
| 'aws.codebuild'
| 'aws.documentdb'
| 'aws.dynamodb'
| 'aws.ebs'
| 'aws.ec2'
Expand Down

0 comments on commit 0034589

Please sign in to comment.