Skip to content

Commit

Permalink
fix(rules): add AWS ECS
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Sep 4, 2023
1 parent 1510e40 commit 1c40cea
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 @@ -24,6 +24,7 @@ exports[`all > should match everything 1`] = `
"aws.amplify_hosting",
"aws.dynamodb",
"aws.ec2",
"aws.ecs",
"aws.elasticache",
"aws.fargate",
"aws.glacier",
Expand Down
18 changes: 18 additions & 0 deletions src/rules/hosting/aws.ecs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { register } from '../../register.js';

register({
tech: 'aws.ecs',
name: 'AWS ECS',
type: 'hosting',
dependencies: [
{ type: 'npm', name: '@aws-sdk/client-ecs' },
{ type: 'rust', name: 'aws-sdk-ecs' },
{ type: 'ruby', name: 'aws-sdk-ecs' },
{ type: 'golang', name: 'github.com/aws/aws-sdk-go-v2/service/ecs' },
{
type: 'terraform.resource',
name: /^aws_ecs/,
example: 'aws_ecs_cluster',
},
],
});
1 change: 1 addition & 0 deletions src/rules/hosting/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import './alibabacloud.js';
import './aws.amplify_hosting.js';
import './aws.ec2.js';
import './aws.ecs.js';
import './aws.fargate.js';
import './aws.js';
import './aws.lambda.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 @@ -5,6 +5,7 @@ exports[`golang (lockfile) > should match everything 1`] = `
"aws",
"aws.dynamodb",
"aws.ec2",
"aws.ecs",
"aws.elasticache",
"aws.glacier",
"aws.lambda",
Expand Down Expand Up @@ -152,6 +153,11 @@ exports[`golang (lockfile) > should match everything 2`] = `
"github.com/aws/aws-sdk-go-v2/service/ec2",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/ecs",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/elasticache",
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 @@ -10,6 +10,7 @@ exports[`npm > should match everything 1`] = `
"aws",
"aws.dynamodb",
"aws.ec2",
"aws.ecs",
"aws.elasticache",
"aws.glacier",
"aws.lambda",
Expand Down Expand Up @@ -162,6 +163,11 @@ exports[`npm > should match everything 2`] = `
"@aws-sdk/client-ec2",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-ecs",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-elasticache",
Expand Down
6 changes: 6 additions & 0 deletions src/rules/spec/ruby/__snapshots__/component.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.dynamodb",
"aws.ec2",
"aws.ecs",
"aws.elasticache",
"aws.glacier",
"aws.lambda",
Expand Down Expand Up @@ -112,6 +113,11 @@ exports[`ruby (component) > should match everything 2`] = `
"aws-sdk-ec2",
"1.0.0",
],
[
"ruby",
"aws-sdk-ecs",
"1.0.0",
],
[
"ruby",
"aws-sdk-elasticache",
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.dynamodb",
"aws.ec2",
"aws.ecs",
"aws.elasticache",
"aws.glacier",
"aws.lambda",
Expand Down Expand Up @@ -77,6 +78,11 @@ exports[`rust (component) > should match everything 2`] = `
"aws-sdk-ec2",
"1.0.0",
],
[
"rust",
"aws-sdk-ecs",
"1.0.0",
],
[
"rust",
"aws-sdk-elasticache",
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.dynamodb",
"aws.ec2",
"aws.ecs",
"aws.elasticache",
"aws.glacier",
"aws.lambda",
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export type AllowedKeys =
| 'aws.amplify_hosting'
| 'aws.dynamodb'
| 'aws.ec2'
| 'aws.ecs'
| 'aws.elasticache'
| 'aws.fargate'
| 'aws.glacier'
Expand Down

0 comments on commit 1c40cea

Please sign in to comment.