Skip to content

Commit

Permalink
fix(rules): add AWS EBS
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Sep 17, 2023
1 parent d39ac8d commit 845d4e5
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 2 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.cloudfront",
"aws.codebuild",
"aws.dynamodb",
"aws.ebs",
"aws.ec2",
"aws.ecs",
"aws.elasticache",
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 @@ -5,6 +5,7 @@ exports[`golang (lockfile) > should match everything 1`] = `
"aws",
"aws.cloudfront",
"aws.dynamodb",
"aws.ebs",
"aws.ec2",
"aws.ecs",
"aws.elasticache",
Expand Down Expand Up @@ -221,6 +222,11 @@ exports[`golang (lockfile) > should match everything 2`] = `
"github.com/aws/aws-sdk-go-v2/service/dynamodb",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/ebs",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/ec2",
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 @@ -13,6 +13,7 @@ exports[`npm > should match everything 1`] = `
"aws.cloudfront",
"aws.codebuild",
"aws.dynamodb",
"aws.ebs",
"aws.ec2",
"aws.ecs",
"aws.elasticache",
Expand Down Expand Up @@ -206,6 +207,11 @@ exports[`npm > should match everything 2`] = `
"@aws-sdk/aws-cloudfront",
"0.0.0",
],
[
"npm",
"@aws-sdk/aws-ebs",
"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 @@ -7,6 +7,7 @@ exports[`ruby (component) > should match everything 1`] = `
"aws",
"aws.cloudfront",
"aws.dynamodb",
"aws.ebs",
"aws.ec2",
"aws.ecs",
"aws.elasticache",
Expand Down Expand Up @@ -142,6 +143,11 @@ exports[`ruby (component) > should match everything 2`] = `
"aws-sdk-e2",
"1.0.0",
],
[
"ruby",
"aws-sdk-ebs",
"1.0.0",
],
[
"ruby",
"aws-sdk-ec2",
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.cloudfront",
"aws.codebuild",
"aws.dynamodb",
"aws.ebs",
"aws.ec2",
"aws.ecs",
"aws.elasticache",
Expand Down Expand Up @@ -87,6 +88,11 @@ exports[`rust (component) > should match everything 2`] = `
"aws-sdk-e2",
"1.0.0",
],
[
"rust",
"aws-sdk-ebs",
"1.0.0",
],
[
"rust",
"aws-sdk-ec2",
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.cloudfront",
"aws.codebuild",
"aws.dynamodb",
"aws.ebs",
"aws.ec2",
"aws.ecs",
"aws.elasticache",
Expand Down
1 change: 0 additions & 1 deletion src/rules/storage/aws.cloudfront.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ register({
},
{ type: 'php', name: 'dreamonkey/laravel-cloudfront-url-signer' },
{ type: 'githubAction', name: 'chetan/invalidate-cloudfront-action' },
{ type: 'githubAction', name: 'chetan/invalidate-cloudfront-action' },
],
});
18 changes: 18 additions & 0 deletions src/rules/storage/aws.ebs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { register } from '../../register.js';

register({
tech: 'aws.ebs',
name: 'AWS EBS',
type: 'storage',
dependencies: [
{ type: 'npm', name: '@aws-sdk/aws-ebs' },
{ type: 'rust', name: 'aws-sdk-ebs' },
{ type: 'ruby', name: 'aws-sdk-ebs' },
{ type: 'golang', name: 'github.com/aws/aws-sdk-go-v2/service/ebs' },
{
type: 'terraform.resource',
name: /^aws_ebs_/,
example: 'aws_ebs_volume',
},
],
});
3 changes: 2 additions & 1 deletion src/rules/storage/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import './aws.glacier.js';
import './aws.cloudfront.js';
import './aws.ebs.js';
import './aws.glacier.js';
import './aws.s3.js';
import './gcp.gcs.js';
import './supabase.storage.js';
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export type AllowedKeys =
| 'aws.cloudfront'
| 'aws.codebuild'
| 'aws.dynamodb'
| 'aws.ebs'
| 'aws.ec2'
| 'aws.ecs'
| 'aws.elasticache'
Expand Down

0 comments on commit 845d4e5

Please sign in to comment.