@pulumi/nomad
Version:
A Pulumi package for creating and managing nomad cloud resources.
64 lines • 2.32 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.getRegionsOutput = exports.getRegions = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Retrieve a list of regions available in Nomad.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as nomad from "@pulumi/nomad";
*
* function notImplemented(message: string) {
* throw new Error(message);
* }
*
* const myRegions = nomad.getRegions({});
* const jobs = notImplemented("The template_file data resource is not yet supported.");
* const app: nomad.Job[] = [];
* myRegions.then(myRegions => myRegions.regions).length.apply(rangeBody => {
* for (const range = {value: 0}; range.value < rangeBody; range.value++) {
* app.push(new nomad.Job(`app-${range.value}`, {jobspec: jobs[range.value].rendered}));
* }
* });
* ```
*/
function getRegions(opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("nomad:index/getRegions:getRegions", {}, opts);
}
exports.getRegions = getRegions;
/**
* Retrieve a list of regions available in Nomad.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as nomad from "@pulumi/nomad";
*
* function notImplemented(message: string) {
* throw new Error(message);
* }
*
* const myRegions = nomad.getRegions({});
* const jobs = notImplemented("The template_file data resource is not yet supported.");
* const app: nomad.Job[] = [];
* myRegions.then(myRegions => myRegions.regions).length.apply(rangeBody => {
* for (const range = {value: 0}; range.value < rangeBody; range.value++) {
* app.push(new nomad.Job(`app-${range.value}`, {jobspec: jobs[range.value].rendered}));
* }
* });
* ```
*/
function getRegionsOutput(opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("nomad:index/getRegions:getRegions", {}, opts);
}
exports.getRegionsOutput = getRegionsOutput;
//# sourceMappingURL=getRegions.js.map