node package manager

google-compute-metadata

Google Compute Engine Metadata

Node module for getting Google Compute Engine instance and project metadata.

Installation

npm install google-compute-metadata

Usage

var metadata = require("google-compute-metadata");
 
metadata.instance(function (err, data) {
  console.log("Instance Id: " +  data.id);
});
 
metadata.project(function (err, data) {
  console.log("Project Id: " +  data.projectId);
});