@cuemby/equinix
Version:
A Pulumi package for creating and managing equinix cloud resources.
53 lines • 1.84 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.getMetalPortOutput = exports.getMetalPort = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Use this data source to read ports of existing devices. You can read port by either its UUID,
* or by a device UUID and port name.
*
* ## Example Usage
*
* Create a device and read it's eth0 port to the datasource.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@cuemby/equinix";
* import * as equinix from "@pulumi/equinix";
*
* const projectId = "<UUID_of_your_project>";
* const testMetalDevice = new equinix.MetalDevice("testMetalDevice", {
* hostname: "tfacc-test-device-port",
* plan: "c3.medium.x86",
* facilities: ["sv15"],
* operatingSystem: "ubuntu_20_04",
* billingCycle: "hourly",
* projectId: projectId,
* });
* const testGetMetalPort = equinix.GetMetalPortOutput({
* deviceId: testMetalDevice.id,
* name: "eth0",
* });
* ```
*/
function getMetalPort(args, opts) {
args = args || {};
if (!opts) {
opts = {};
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
return pulumi.runtime.invoke("equinix:index/getMetalPort:GetMetalPort", {
"deviceId": args.deviceId,
"name": args.name,
"portId": args.portId,
}, opts);
}
exports.getMetalPort = getMetalPort;
function getMetalPortOutput(args, opts) {
return pulumi.output(args).apply(a => getMetalPort(a, opts));
}
exports.getMetalPortOutput = getMetalPortOutput;
//# sourceMappingURL=getMetalPort.js.map