@equinix-labs/pulumi-equinix
Version:
A Pulumi package for creating and managing equinix cloud resources.
100 lines • 2.96 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.getVlanOutput = exports.getVlan = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an Equinix Metal Virtual Network datasource. VLANs data sources can be searched by VLAN UUID, or project UUID and vxlan number.
*
* ## Example Usage
*
* Fetch a vlan by ID:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const foovlan = new equinix.metal.Vlan("foovlan", {
* projectId: local.project_id,
* metro: "sv",
* vxlan: 5,
* });
* const dsvlan = equinix.metal.getVlanOutput({
* vlanId: foovlan.id,
* });
* ```
*
* Fetch a vlan by project ID, vxlan and metro
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const dsvlan = equinix.metal.getVlan({
* projectId: local.project_id,
* vxlan: 5,
* metro: "sv",
* });
* ```
*/
function getVlan(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("equinix:metal/getVlan:getVlan", {
"facility": args.facility,
"metro": args.metro,
"projectId": args.projectId,
"vlanId": args.vlanId,
"vxlan": args.vxlan,
}, opts);
}
exports.getVlan = getVlan;
/**
* Provides an Equinix Metal Virtual Network datasource. VLANs data sources can be searched by VLAN UUID, or project UUID and vxlan number.
*
* ## Example Usage
*
* Fetch a vlan by ID:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const foovlan = new equinix.metal.Vlan("foovlan", {
* projectId: local.project_id,
* metro: "sv",
* vxlan: 5,
* });
* const dsvlan = equinix.metal.getVlanOutput({
* vlanId: foovlan.id,
* });
* ```
*
* Fetch a vlan by project ID, vxlan and metro
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const dsvlan = equinix.metal.getVlan({
* projectId: local.project_id,
* vxlan: 5,
* metro: "sv",
* });
* ```
*/
function getVlanOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("equinix:metal/getVlan:getVlan", {
"facility": args.facility,
"metro": args.metro,
"projectId": args.projectId,
"vlanId": args.vlanId,
"vxlan": args.vxlan,
}, opts);
}
exports.getVlanOutput = getVlanOutput;
//# sourceMappingURL=getVlan.js.map