Skip to content

Commit

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

register({
tech: 'aws.lightsail',
name: 'AWS Lightsail',
type: 'hosting',
dependencies: [
{ type: 'npm', name: '@aws-cdk/aws-lightsail' },
{ type: 'npm', name: '@aws-sdk/client-lightsail' },
{ type: 'rust', name: 'aws-sdk-lightsail' },
{ type: 'ruby', name: 'aws-sdk-lightsail' },
{ type: 'golang', name: 'github.com/aws/aws-sdk-go-v2/service/lightsail' },
{
type: 'terraform.resource',
name: /^aws_lightsail/,
example: 'aws_lightsail_bucket',
},
],
});
3 changes: 2 additions & 1 deletion src/rules/hosting/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import './aws.ecs.js';
import './aws.fargate.js';
import './aws.js';
import './aws.lambda.js';
import './aws.lightsail.js';
import './azure.js';
import './cloudflare.js';
import './cloudflare.pages.js';
Expand All @@ -22,8 +23,8 @@ import './gcp.cloudrun.js';
import './gcp.functions.js';
import './gcp.gce.js';
import './gcp.gke.js';
import './gcp.tasks.js';
import './gcp.js';
import './gcp.tasks.js';
import './github.pages.js';
import './heroku.js';
import './kubernetes.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 @@ -13,6 +13,7 @@ exports[`golang (lockfile) > should match everything 1`] = `
"aws.elasticache",
"aws.glacier",
"aws.lambda",
"aws.lightsail",
"aws.neptune",
"aws.rds",
"aws.redshift",
Expand Down Expand Up @@ -267,6 +268,11 @@ exports[`golang (lockfile) > should match everything 2`] = `
"github.com/aws/aws-sdk-go-v2/service/lambda",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/lightsail",
"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 @@ -21,6 +21,7 @@ exports[`npm > should match everything 1`] = `
"aws.elasticache",
"aws.glacier",
"aws.lambda",
"aws.lightsail",
"aws.neptune",
"aws.rds",
"aws.redshift",
Expand Down Expand Up @@ -252,6 +253,11 @@ exports[`npm > should match everything 2`] = `
"@aws-cdk/aws-lambda",
"0.0.0",
],
[
"npm",
"@aws-cdk/aws-lightsail",
"0.0.0",
],
[
"npm",
"@aws-cdk/aws-neptune",
Expand Down Expand Up @@ -342,6 +348,11 @@ exports[`npm > should match everything 2`] = `
"@aws-sdk/client-lambda",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-lightsail",
"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 @@ -15,6 +15,7 @@ exports[`ruby (component) > should match everything 1`] = `
"aws.elasticache",
"aws.glacier",
"aws.lambda",
"aws.lightsail",
"aws.neptune",
"aws.rds",
"aws.redshift",
Expand Down Expand Up @@ -193,6 +194,11 @@ exports[`ruby (component) > should match everything 2`] = `
"aws-sdk-lambda",
"1.0.0",
],
[
"ruby",
"aws-sdk-lightsail",
"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 @@ -17,6 +17,7 @@ exports[`rust (component) > should match everything 1`] = `
"aws.elasticache",
"aws.glacier",
"aws.lambda",
"aws.lightsail",
"aws.neptune",
"aws.rds",
"aws.redshift",
Expand Down Expand Up @@ -138,6 +139,11 @@ exports[`rust (component) > should match everything 2`] = `
"aws-sdk-lambda",
"1.0.0",
],
[
"rust",
"aws-sdk-lightsail",
"1.0.0",
],
[
"rust",
"aws-sdk-neptune",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ exports[`terraform (resource) > should match everything 1`] = `
"aws.elasticache",
"aws.glacier",
"aws.lambda",
"aws.lightsail",
"aws.neptune",
"aws.rds",
"aws.redshift",
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export type AllowedKeys =
| 'aws.fargate'
| 'aws.glacier'
| 'aws.lambda'
| 'aws.lightsail'
| 'aws.neptune'
| 'aws.rds'
| 'aws.redshift'
Expand Down

0 comments on commit 1ae666e

Please sign in to comment.