Skip to content

Commit

Permalink
fix(rules): add Azure Postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Sep 18, 2023
1 parent aa63515 commit 52bde9d
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 @@ -67,6 +67,7 @@ exports[`all > should match everything 1`] = `
"azure.aks",
"azure.ci",
"azure.cosmosdb",
"azure.postgres",
"azure.sql",
"betterstack",
"bigcommerce",
Expand Down
18 changes: 18 additions & 0 deletions src/rules/db/azure.postgres.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { register } from '../../register.js';

register({
tech: 'azure.postgres',
name: 'Azure Postgres',
type: 'db',
dependencies: [
{
type: 'terraform.resource',
name: /^azurerm_postgresql_/,
example: 'azurerm_postgresql_database',
},
{ type: 'ruby', name: 'azure_mgmt_postgresql' },
{ type: 'rust', name: 'azure_mgmt_postgresql' },
{ type: 'npm', name: '@azure/arm-postgresql' },
{ type: 'githubAction', name: 'azure/postgresql' },
],
});
1 change: 1 addition & 0 deletions src/rules/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import './aws.redshift.js';
import './aws.secretsmanager.js';
import './aws.timestream.js';
import './azure.cosmosdb.js';
import './azure.postgres.js';
import './azure.sql.js';
import './clickhouse.js';
import './cockroachdb.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ exports[`docker > should match all dependencies 1`] = `
"aws.lambda",
"aws.s3",
"azure",
"azure.postgres",
"azure.sql",
"cloudflare",
"cloudflare.pages",
Expand Down Expand Up @@ -238,6 +239,11 @@ exports[`docker > should match all dependencies 2`] = `
"azure/login",
"1",
],
[
"githubAction",
"azure/postgresql",
"1",
],
[
"githubAction",
"azure/powershell",
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 @@ -50,6 +50,7 @@ exports[`npm > should match everything 1`] = `
"aws.translate",
"azure",
"azure.cosmosdb",
"azure.postgres",
"azure.sql",
"betterstack",
"bootstrap",
Expand Down Expand Up @@ -625,6 +626,11 @@ exports[`npm > should match everything 2`] = `
"@azure/arm-cosmosdb",
"0.0.0",
],
[
"npm",
"@azure/arm-postgresql",
"0.0.0",
],
[
"npm",
"@azure/arm-sql",
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 @@ -45,6 +45,7 @@ exports[`ruby (component) > should match everything 1`] = `
"aws.translate",
"azure",
"azure.cosmosdb",
"azure.postgres",
"azure.sql",
"betterstack",
"brevo",
Expand Down Expand Up @@ -365,6 +366,11 @@ exports[`ruby (component) > should match everything 2`] = `
"azure_mgmt_cosmosdb",
"1.0.0",
],
[
"ruby",
"azure_mgmt_postgresql",
"1.0.0",
],
[
"ruby",
"azure_mgmt_sql",
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 @@ -46,6 +46,7 @@ exports[`rust (component) > should match everything 1`] = `
"aws.translate",
"azure",
"azure.cosmosdb",
"azure.postgres",
"azure.sql",
"cloudflare",
"couchbase",
Expand Down Expand Up @@ -306,6 +307,11 @@ exports[`rust (component) > should match everything 2`] = `
"azure_mgmt_cosmosdb",
"1.0.0",
],
[
"rust",
"azure_mgmt_postgresql",
"1.0.0",
],
[
"rust",
"azure_mgmt_sql",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ exports[`terraform (resource) > should match everything 1`] = `
"azure",
"azure.aks",
"azure.cosmosdb",
"azure.postgres",
"azure.sql",
"cloudflare",
"cloudflare.pages",
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export type AllowedKeys =
| 'azure.aks'
| 'azure.ci'
| 'azure.cosmosdb'
| 'azure.postgres'
| 'azure.sql'
| 'azure'
| 'bash'
Expand Down

0 comments on commit 52bde9d

Please sign in to comment.