Skip to content

Commit

Permalink
fix(rules): add Azure MariaDB
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Sep 18, 2023
1 parent f2d8cf3 commit c00c01a
Show file tree
Hide file tree
Showing 10 changed files with 50 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 @@ -67,6 +67,7 @@ exports[`all > should match everything 1`] = `
"azure.aks",
"azure.ci",
"azure.cosmosdb",
"azure.mariadb",
"azure.mysql",
"azure.postgres",
"azure.redis",
Expand Down
21 changes: 21 additions & 0 deletions src/rules/db/azure.mariadb.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { register } from '../../register.js';

register({
tech: 'azure.mariadb',
name: 'Azure MariaDB',
type: 'db',
dependencies: [
{
type: 'terraform.resource',
name: /^azurerm_mariadb_/,
example: 'azurerm_mariadb_database',
},
{ type: 'ruby', name: 'azure_mgmt_mariadb' },
{ type: 'rust', name: 'azure_mgmt_mariadb' },
{ type: 'npm', name: '@azure/arm-mariadb' },
{
type: 'golang',
name: 'github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mariadb/armmariadb',
},
],
});
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.mariadb.js';
import './azure.mysql.js';
import './azure.postgres.js';
import './azure.redis.js';
Expand Down
2 changes: 1 addition & 1 deletion src/rules/db/mariadb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ register({
name: 'MariaDB',
type: 'db',
dependencies: [
{ type: 'npm', name: /mariadb/, example: 'mariadb' },
{ type: 'npm', name: 'mariadb', example: 'mariadb' },
{ type: 'docker', name: /mariadb/, example: 'mariadb:0.0.0' },
{ type: 'ruby', name: 'tencentcloud-sdk-mariadb' },
],
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 @@ -43,6 +43,7 @@ exports[`golang (lockfile) > should match everything 1`] = `
"aws.translate",
"azure",
"azure.cosmosdb",
"azure.mariadb",
"azure.mysql",
"azure.postgres",
"azure.redis",
Expand Down Expand Up @@ -231,6 +232,11 @@ exports[`golang (lockfile) > should match everything 2`] = `
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos",
"v1.0.0",
],
[
"golang",
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mariadb/armmariadb",
"v1.0.0",
],
[
"golang",
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysql",
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.mariadb",
"azure.mysql",
"azure.postgres",
"azure.redis",
Expand Down Expand Up @@ -628,6 +629,11 @@ exports[`npm > should match everything 2`] = `
"@azure/arm-cosmosdb",
"0.0.0",
],
[
"npm",
"@azure/arm-mariadb",
"0.0.0",
],
[
"npm",
"@azure/arm-mysql",
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.mariadb",
"azure.mysql",
"azure.postgres",
"azure.redis",
Expand Down Expand Up @@ -368,6 +369,11 @@ exports[`ruby (component) > should match everything 2`] = `
"azure_mgmt_cosmosdb",
"1.0.0",
],
[
"ruby",
"azure_mgmt_mariadb",
"1.0.0",
],
[
"ruby",
"azure_mgmt_mysql",
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.mariadb",
"azure.mysql",
"azure.postgres",
"azure.redis",
Expand Down Expand Up @@ -309,6 +310,11 @@ exports[`rust (component) > should match everything 2`] = `
"azure_mgmt_cosmosdb",
"1.0.0",
],
[
"rust",
"azure_mgmt_mariadb",
"1.0.0",
],
[
"rust",
"azure_mgmt_mysql",
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.mariadb",
"azure.mysql",
"azure.postgres",
"azure.redis",
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.mariadb'
| 'azure.mysql'
| 'azure.postgres'
| 'azure.redis'
Expand Down

0 comments on commit c00c01a

Please sign in to comment.