Skip to content

Commit

Permalink
fix(rules): add GCP Ai Platform
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Aug 7, 2023
1 parent adf585c commit da08aef
Show file tree
Hide file tree
Showing 7 changed files with 27 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 @@ -47,6 +47,7 @@ export const list: TechItem[] = [
{ key: 'firebase', name: 'Firebase', type: 'hosting' },
{ key: 'flyio', name: 'Fly.io', type: 'hosting' },
{ key: 'gcp', name: 'GCP', type: 'hosting' },
{ key: 'gcp.aiplatform', name: 'AI Platform', type: 'api' },
{ key: 'gcp.bigquery', name: 'Big Query', type: 'db' },
{ key: 'gcp.bigtable', name: 'Big Table', type: 'db' },
{ key: 'gcp.dns', name: 'DNS', type: 'network' },
Expand Down
14 changes: 14 additions & 0 deletions src/rules/api/gcp.aiplatform.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { register } from '../../rules.js';

register({
tech: 'gcp.aiplatform',
dependencies: [
{ type: 'npm', name: '@google-cloud/aiplatform' },
{ type: 'terraform.resource', name: 'google_vertex_ai_index' },
{
type: 'ruby',
name: /^google-cloud-ai_platform/,
example: 'google-cloud-ai_platform-v1',
},
],
});
3 changes: 3 additions & 0 deletions src/rules/api/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import './gcp.aiplatform.js';
import './gcp.language.js';
import './gcp.maps.js';
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 @@ -21,6 +21,7 @@ exports[`npm > should match everything 1`] = `
"fastly",
"firebase",
"gcp",
"gcp.aiplatform",
"gcp.bigquery",
"gcp.bigtable",
"gcp.cloudbuild",
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 @@ -3,6 +3,7 @@
exports[`ruby (component) > should match everything 1`] = `
Set {
"gcp",
"gcp.aiplatform",
"gcp.language",
"gcp.maps",
"zookeeper",
Expand Down Expand Up @@ -172,6 +173,11 @@ exports[`ruby (component) > should match everything 2`] = `
"google-apis-sqladmin_v1beta4",
"1.0.0",
],
[
"ruby",
"google-cloud-ai_platform-v1",
"1.0.0",
],
[
"ruby",
"google-cloud-bigquery",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exports[`terraform (resource) > should match everything 1`] = `
[
"datadog",
"gcp",
"gcp.aiplatform",
"gcp.bigquery",
"gcp.bigtable",
"gcp.cloudbuild",
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export type AllowedKeys =
| 'fastly'
| 'firebase'
| 'flyio'
| 'gcp.aiplatform'
| 'gcp.bigquery'
| 'gcp.bigtable'
| 'gcp.cloudbuild'
Expand Down

0 comments on commit da08aef

Please sign in to comment.