Skip to content

Commit

Permalink
fix(rules): add GCP Dataproc
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Aug 7, 2023
1 parent 5f8fcd5 commit 95267e5
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/common/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const list: TechItem[] = [
{ key: 'gcp.cloudrun', name: 'Cloud Run', type: 'hosting' },
{ key: 'gcp.functions', name: 'Functions', type: 'hosting' },
{ key: 'gcp.cloudbuild', name: 'Cloud Build', type: 'tool' },
{ key: 'gcp.dataproc', name: 'Dataproc', type: 'etl' },
{ key: 'gcp.maps', name: 'Maps', type: 'api' },
{ key: 'gcp.language', name: 'Language', type: 'api' },
{ key: 'gcp.secretmanager', name: 'Secret manager', type: 'db' },
Expand Down
18 changes: 18 additions & 0 deletions src/rules/etl/gcp.dataproc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { register } from '../../rules.js';

register({
tech: 'gcp.dataproc',
dependencies: [
{ type: 'npm', name: '@google-cloud/dataproc' },
{
type: 'terraform.resource',
name: /^google_dataproc_/,
example: 'google_dataproc_job',
},
{
type: 'ruby',
name: /^google-cloud-dataproc/,
example: 'google-cloud-dataproc-v1',
},
],
});
1 change: 1 addition & 0 deletions src/rules/etl/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './gcp.dataproc.js';
1 change: 1 addition & 0 deletions src/rules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import './api/index.js';
import './app/index.js';
import './ci/index.js';
import './db/index.js';
import './etl/index.js';
import './hosting/index.js';
import './js/index.js';
import './messaging/index.js';
Expand Down
1 change: 1 addition & 0 deletions src/rules/spec/nodejs/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ exports[`npm > should match everything 1`] = `
"gcp.bigtable",
"gcp.cloudbuild",
"gcp.cloudrun",
"gcp.dataproc",
"gcp.datastore",
"gcp.dns",
"gcp.functions",
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 @@ -30,6 +30,7 @@ Set {
"redis",
"snowflake",
"sqlite",
"gcp.dataproc",
"aws.s3",
"azure",
"fastly",
Expand Down Expand Up @@ -201,6 +202,11 @@ exports[`ruby (component) > should match everything 2`] = `
"google-cloud-compute",
"1.0.0",
],
[
"ruby",
"google-cloud-dataproc-v1",
"1.0.0",
],
[
"ruby",
"google-cloud-datastore",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ exports[`terraform (resource) > should match everything 1`] = `
"gcp.bigtable",
"gcp.cloudbuild",
"gcp.cloudrun",
"gcp.dataproc",
"gcp.datastore",
"gcp.dns",
"gcp.functions",
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export type AllowedKeys =
| 'gcp.bigtable'
| 'gcp.cloudbuild'
| 'gcp.cloudrun'
| 'gcp.dataproc'
| 'gcp.datastore'
| 'gcp.dns'
| 'gcp.functions'
Expand Down

0 comments on commit 95267e5

Please sign in to comment.