@pulumi/nomad
Version:
A Pulumi package for creating and managing nomad cloud resources.
80 lines • 3 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPluginOutput = exports.getPlugin = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Lookup a plugin by ID. The aim of this datasource is to determine whether
* a particular plugin exists on the cluster, to find information on the health
* and availability of the plugin, and to optionally wait for the plugin
* before performing actions the require an available plugin controller.
*
* If a plugin with the specified ID does not exist and the datasource is not
* configured to wait, it will result in an error. For simple existence checks,
* use the `nomad.getPlugins` listing datasource.
*
* ## Example Usage
*
* Check for the existence of a plugin:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as nomad from "@pulumi/nomad";
*
* const ebs = nomad.getPlugin({
* pluginId: "aws-ebs0",
* waitForHealthy: true,
* });
* ```
*
* This will check for a plugin with the ID `aws-ebs0`, waiting until the plugin
* is healthy before returning.
*/
function getPlugin(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("nomad:index/getPlugin:getPlugin", {
"pluginId": args.pluginId,
"waitForHealthy": args.waitForHealthy,
"waitForRegistration": args.waitForRegistration,
}, opts);
}
exports.getPlugin = getPlugin;
/**
* Lookup a plugin by ID. The aim of this datasource is to determine whether
* a particular plugin exists on the cluster, to find information on the health
* and availability of the plugin, and to optionally wait for the plugin
* before performing actions the require an available plugin controller.
*
* If a plugin with the specified ID does not exist and the datasource is not
* configured to wait, it will result in an error. For simple existence checks,
* use the `nomad.getPlugins` listing datasource.
*
* ## Example Usage
*
* Check for the existence of a plugin:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as nomad from "@pulumi/nomad";
*
* const ebs = nomad.getPlugin({
* pluginId: "aws-ebs0",
* waitForHealthy: true,
* });
* ```
*
* This will check for a plugin with the ID `aws-ebs0`, waiting until the plugin
* is healthy before returning.
*/
function getPluginOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("nomad:index/getPlugin:getPlugin", {
"pluginId": args.pluginId,
"waitForHealthy": args.waitForHealthy,
"waitForRegistration": args.waitForRegistration,
}, opts);
}
exports.getPluginOutput = getPluginOutput;
//# sourceMappingURL=getPlugin.js.map