From 5c4fe78524f61c3dfc0675f5ca79648e43cae1cc Mon Sep 17 00:00:00 2001 From: Samuel Bodin <1637651+bodinsamuel@users.noreply.github.com> Date: Sat, 21 Oct 2023 16:35:34 +0200 Subject: [PATCH] fix(rules): add Scaleway Elasticmetal --- src/rules/__snapshots__/index.test.ts.snap | 1 + src/rules/hosting/index.ts | 1 + src/rules/hosting/scaleway.elasticmetal.ts | 10 ++++++++++ .../spec/terraform/__snapshots__/resource.test.ts.snap | 1 + src/types/techs.ts | 1 + 5 files changed, 14 insertions(+) create mode 100644 src/rules/hosting/scaleway.elasticmetal.ts diff --git a/src/rules/__snapshots__/index.test.ts.snap b/src/rules/__snapshots__/index.test.ts.snap index ed746c98..bf217431 100644 --- a/src/rules/__snapshots__/index.test.ts.snap +++ b/src/rules/__snapshots__/index.test.ts.snap @@ -316,6 +316,7 @@ exports[`all > should match everything 1`] = ` "scaleway.container", "scaleway.database", "scaleway.documentdb", + "scaleway.elasticmetal", "scaleway.function", "scaleway.redis", "scaleway.secretmanager", diff --git a/src/rules/hosting/index.ts b/src/rules/hosting/index.ts index 668adfe1..daa10756 100644 --- a/src/rules/hosting/index.ts +++ b/src/rules/hosting/index.ts @@ -33,6 +33,7 @@ import './qovery.cluster.js'; import './render.js'; import './replit.js'; import './scaleway.container.js'; +import './scaleway.elasticmetal.js'; import './scaleway.functions.js'; import './sitecore.js'; import './supabase.functions.js'; diff --git a/src/rules/hosting/scaleway.elasticmetal.ts b/src/rules/hosting/scaleway.elasticmetal.ts new file mode 100644 index 00000000..bd3dd889 --- /dev/null +++ b/src/rules/hosting/scaleway.elasticmetal.ts @@ -0,0 +1,10 @@ +import { register } from '../../register.js'; + +register({ + tech: 'scaleway.elasticmetal', + name: 'Scaleway Elastic Metal', + type: 'hosting', + dependencies: [ + { type: 'terraform.resource', name: 'scaleway_baremetal_server' }, + ], +}); diff --git a/src/rules/spec/terraform/__snapshots__/resource.test.ts.snap b/src/rules/spec/terraform/__snapshots__/resource.test.ts.snap index c030f25d..f5aba72d 100644 --- a/src/rules/spec/terraform/__snapshots__/resource.test.ts.snap +++ b/src/rules/spec/terraform/__snapshots__/resource.test.ts.snap @@ -93,6 +93,7 @@ exports[`terraform (resource) > should match everything 1`] = ` "scaleway.container", "scaleway.database", "scaleway.documentdb", + "scaleway.elasticmetal", "scaleway.function", "scaleway.redis", "scaleway.secretmanager", diff --git a/src/types/techs.ts b/src/types/techs.ts index 6a8dab32..db8d027c 100644 --- a/src/types/techs.ts +++ b/src/types/techs.ts @@ -335,6 +335,7 @@ export type AllowedKeys = | 'scaleway.container' | 'scaleway.database' | 'scaleway.documentdb' + | 'scaleway.elasticmetal' | 'scaleway.function' | 'scaleway.redis' | 'scaleway.secretmanager'