Skip to content

Commit

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

register({
tech: 'aws.opensearch',
name: 'AWS Opensearch',
type: 'db',
dependencies: [
{ type: 'npm', name: '@aws-cdk/aws-opensearch' },
{ type: 'npm', name: '@aws-sdk/client-opensearch' },
{ type: 'rust', name: 'aws-sdk-opensearch' },
{ type: 'ruby', name: 'aws-sdk-opensearch' },
{
type: 'golang',
name: 'github.com/aws/aws-sdk-go-v2/service/opensearch',
},
{
type: 'terraform.resource',
name: /^aws_opensearch/,
example: 'aws_opensearch_domain',
},
],
});
1 change: 1 addition & 0 deletions src/rules/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import './aws.documentdb.js';
import './aws.dynamodb.js';
import './aws.elasticache.js';
import './aws.neptune.js';
import './aws.opensearch.js';
import './aws.rds.js';
import './aws.redshift.js';
import './clickhouse.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 @@ -17,6 +17,7 @@ exports[`golang (lockfile) > should match everything 1`] = `
"aws.lambda",
"aws.lightsail",
"aws.neptune",
"aws.opensearch",
"aws.rds",
"aws.redshift",
"aws.s3",
Expand Down Expand Up @@ -290,6 +291,11 @@ exports[`golang (lockfile) > should match everything 2`] = `
"github.com/aws/aws-sdk-go-v2/service/neptune",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/opensearch",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/rds",
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 @@ -25,6 +25,7 @@ exports[`npm > should match everything 1`] = `
"aws.lambda",
"aws.lightsail",
"aws.neptune",
"aws.opensearch",
"aws.rds",
"aws.redshift",
"aws.s3",
Expand Down Expand Up @@ -275,6 +276,11 @@ exports[`npm > should match everything 2`] = `
"@aws-cdk/aws-neptune",
"0.0.0",
],
[
"npm",
"@aws-cdk/aws-opensearch",
"0.0.0",
],
[
"npm",
"@aws-cdk/aws-rds",
Expand Down Expand Up @@ -380,6 +386,11 @@ exports[`npm > should match everything 2`] = `
"@aws-sdk/client-neptune",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-opensearch",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-rds",
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 @@ -19,6 +19,7 @@ exports[`ruby (component) > should match everything 1`] = `
"aws.lambda",
"aws.lightsail",
"aws.neptune",
"aws.opensearch",
"aws.rds",
"aws.redshift",
"aws.s3",
Expand Down Expand Up @@ -216,6 +217,11 @@ exports[`ruby (component) > should match everything 2`] = `
"aws-sdk-neptune",
"1.0.0",
],
[
"ruby",
"aws-sdk-opensearch",
"1.0.0",
],
[
"ruby",
"aws-sdk-rds",
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 @@ -21,6 +21,7 @@ exports[`rust (component) > should match everything 1`] = `
"aws.lambda",
"aws.lightsail",
"aws.neptune",
"aws.opensearch",
"aws.rds",
"aws.redshift",
"aws.s3",
Expand Down Expand Up @@ -161,6 +162,11 @@ exports[`rust (component) > should match everything 2`] = `
"aws-sdk-neptune",
"1.0.0",
],
[
"rust",
"aws-sdk-opensearch",
"1.0.0",
],
[
"rust",
"aws-sdk-rds",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ exports[`terraform (resource) > should match everything 1`] = `
"aws.lambda",
"aws.lightsail",
"aws.neptune",
"aws.opensearch",
"aws.rds",
"aws.redshift",
"aws.s3",
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export type AllowedKeys =
| 'aws.lambda'
| 'aws.lightsail'
| 'aws.neptune'
| 'aws.opensearch'
| 'aws.rds'
| 'aws.redshift'
| 'aws.s3'
Expand Down

0 comments on commit 5ce7f80

Please sign in to comment.