cloud-detect-js
cloud-detect-js
is a Node.JS module that determines a host's cloud provider. Highly inspired by the Go based Satellite, cloud-detect-js
uses the same techniques (file systems and provider metadata) to properly identify cloud providers. Currently Supports AWS, GCP, Azure, Alibaba, Oracle, and Digital Ocean Cloud Providers.
Installation
Via NPM:
npm install --save cloud-detect-js
Via Yarn:
yarn add cloud-detect-js
Usage
const cloudProvider = ; async { await ; // wil return one of 'aws', 'gcp', 'azure', 'oracle', 'alibaba', 'do' or 'unknown' await ; // 'gcp' await ; //excluded // 'unknown'};
CLI Usage
Installation
Via NPM:
npm install -g cloud-detect-js
Via Yarn:
yarn add global cloud-detect-js
Usage
Usage: cloud-detect-js [options] [command] Options: -V, --version output the version number -h, --help output usage information Commands: detect|d Detect's Host Machine's Cloud Provider cloud-detect-js d# aws cloud-detect-js detect# gcp