Skip to content

Commit

Permalink
fix(rules): add GCP Logging
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Sep 18, 2023
1 parent 4f4ea7f commit cb93e5d
Show file tree
Hide file tree
Showing 10 changed files with 53 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 @@ -138,6 +138,7 @@ exports[`all > should match everything 1`] = `
"gcp.gke",
"gcp.kms",
"gcp.language",
"gcp.logging",
"gcp.maps",
"gcp.memorystore",
"gcp.pubsub",
Expand Down
19 changes: 19 additions & 0 deletions src/rules/monitoring/gcp.logging.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { register } from '../../register.js';

register({
tech: 'gcp.logging',
name: 'GCP Logging',
type: 'storage',
dependencies: [
{ type: 'npm', name: '@google-cloud/logging' },
{ type: 'golang', name: 'cloud.google.com/go/logging' },
{ type: 'ruby', name: 'google-cloud-logging' },
{ type: 'rust', name: 'google-cloud-logging' },
{ type: 'php', name: 'google/cloud-logging' },
{
type: 'terraform.resource',
name: /^google_logging_/,
example: 'google_logging_metric',
},
],
});
1 change: 1 addition & 0 deletions src/rules/monitoring/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import './aws.cloudwatch.js';
import './betterstack.js';
import './datadog.js';
import './gcp.logging.js';
import './newrelic.js';
import './onlineornot.js';
import './pingdom.js';
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 @@ -59,6 +59,7 @@ exports[`golang (lockfile) > should match everything 1`] = `
"gcp.gcs",
"gcp.kms",
"gcp.language",
"gcp.logging",
"gcp.maps",
"gcp.memorystore",
"gcp.pubsub",
Expand Down Expand Up @@ -147,6 +148,11 @@ exports[`golang (lockfile) > should match everything 2`] = `
"cloud.google.com/go/language",
"v1.0.0",
],
[
"golang",
"cloud.google.com/go/logging",
"v1.0.0",
],
[
"golang",
"cloud.google.com/go/maps",
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 @@ -92,6 +92,7 @@ exports[`npm > should match everything 1`] = `
"gcp.gcs",
"gcp.kms",
"gcp.language",
"gcp.logging",
"gcp.maps",
"gcp.memorystore",
"gcp.pubsub",
Expand Down Expand Up @@ -750,6 +751,11 @@ exports[`npm > should match everything 2`] = `
"@google-cloud/language",
"0.0.0",
],
[
"npm",
"@google-cloud/logging",
"0.0.0",
],
[
"npm",
"@google-cloud/maps",
Expand Down
6 changes: 6 additions & 0 deletions src/rules/spec/php/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ exports[`php > should match everything 1`] = `
"gcp.gcs",
"gcp.kms",
"gcp.language",
"gcp.logging",
"gcp.memorystore",
"gcp.pubsub",
"gcp.secretmanager",
Expand Down Expand Up @@ -425,6 +426,11 @@ exports[`php > should match everything 2`] = `
"google/cloud-language",
"0.0.0",
],
[
"php",
"google/cloud-logging",
"0.0.0",
],
[
"php",
"google/cloud-pubsub",
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 @@ -68,6 +68,7 @@ exports[`ruby (component) > should match everything 1`] = `
"gcp.gcs",
"gcp.kms",
"gcp.language",
"gcp.logging",
"gcp.maps",
"gcp.memorystore",
"gcp.pubsub",
Expand Down Expand Up @@ -524,6 +525,11 @@ exports[`ruby (component) > should match everything 2`] = `
"google-cloud-language-v1",
"1.0.0",
],
[
"ruby",
"google-cloud-logging",
"1.0.0",
],
[
"ruby",
"google-cloud-pubsub",
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 @@ -54,6 +54,7 @@ exports[`rust (component) > should match everything 1`] = `
"gcp",
"gcp.bigquery",
"gcp.gcs",
"gcp.logging",
"gcp.pubsub",
"gitlab",
"hashicorp_vault",
Expand Down Expand Up @@ -358,6 +359,11 @@ exports[`rust (component) > should match everything 2`] = `
"gitlab",
"1.0.0",
],
[
"rust",
"google-cloud-logging",
"1.0.0",
],
[
"rust",
"google-cloud-metadata",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ exports[`terraform (resource) > should match everything 1`] = `
"gcp.gcs",
"gcp.gke",
"gcp.kms",
"gcp.logging",
"gcp.maps",
"gcp.memorystore",
"gcp.pubsub",
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export type AllowedKeys =
| 'gcp.gke'
| 'gcp.kms'
| 'gcp.language'
| 'gcp.logging'
| 'gcp.maps'
| 'gcp.memorystore'
| 'gcp.pubsub'
Expand Down

0 comments on commit cb93e5d

Please sign in to comment.