@equinix-labs/pulumi-equinix
Version:
A Pulumi package for creating and managing equinix cloud resources.
88 lines • 3.13 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDeviceOutput = exports.getDevice = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* The datasource can be used to fetch a single device.
*
* If you need to fetch a list of devices which meet filter criteria, you can use the equinix.metal.getDevices datasource.
*
* > **Note:** All arguments including the `rootPassword` and `userData` will be stored in the raw state as plain-text. Read more about sensitive data in state.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const test = equinix.metal.getDevice({
* projectId: local.project_id,
* hostname: "mydevice",
* });
* export const id = test.then(test => test.id);
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const test = equinix.metal.getDevice({
* deviceId: "4c641195-25e5-4c3c-b2b7-4cd7a42c7b40",
* });
* export const ipv4 = test.then(test => test.accessPublicIpv4);
* ```
*/
function getDevice(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("equinix:metal/getDevice:getDevice", {
"deviceId": args.deviceId,
"hostname": args.hostname,
"projectId": args.projectId,
}, opts);
}
exports.getDevice = getDevice;
/**
* The datasource can be used to fetch a single device.
*
* If you need to fetch a list of devices which meet filter criteria, you can use the equinix.metal.getDevices datasource.
*
* > **Note:** All arguments including the `rootPassword` and `userData` will be stored in the raw state as plain-text. Read more about sensitive data in state.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const test = equinix.metal.getDevice({
* projectId: local.project_id,
* hostname: "mydevice",
* });
* export const id = test.then(test => test.id);
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const test = equinix.metal.getDevice({
* deviceId: "4c641195-25e5-4c3c-b2b7-4cd7a42c7b40",
* });
* export const ipv4 = test.then(test => test.accessPublicIpv4);
* ```
*/
function getDeviceOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("equinix:metal/getDevice:getDevice", {
"deviceId": args.deviceId,
"hostname": args.hostname,
"projectId": args.projectId,
}, opts);
}
exports.getDeviceOutput = getDeviceOutput;
//# sourceMappingURL=getDevice.js.map