@equinix-labs/pulumi-equinix
Version:
A Pulumi package for creating and managing equinix cloud resources.
167 lines • 7.32 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.RoutingProtocol = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Fabric V4 API compatible resource allows creation and management of Equinix Fabric connection
*
* Additional documentation:
* * Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/FCR/connections/FCR-connect-azureQC.htm#ConfigureRoutingDetailsintheFabricPortal
* * API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#routing-protocols
*
* ## Example Usage
* ### example 1
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const direct = new equinix.fabric.RoutingProtocol("direct", {
* connectionUuid: "<some_id>",
* type: "DIRECT",
* name: "direct_rp",
* directIpv4: {
* equinixIfaceIp: "190.1.1.1/30",
* },
* directIpv6: {
* equinixIfaceIp: "190::1:1/126",
* },
* });
* ```
* ### example 2
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const bgp = new equinix.fabric.RoutingProtocol("bgp", {
* connectionUuid: "<same_connection_id_as_first_equinix_fabric_routing_protocol>",
* type: "BGP",
* name: "bgp_rp",
* bgpIpv4: {
* customerPeerIp: "190.1.1.2",
* enabled: true,
* },
* bgpIpv6: {
* customerPeerIp: "190::1:2",
* enabled: true,
* },
* customerAsn: 4532,
* });
* ```
* ### example 3
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const direct = new equinix.fabric.RoutingProtocol("direct", {
* connectionUuid: "<some_id>",
* type: "DIRECT",
* name: "direct_rp",
* directIpv4: {
* equinixIfaceIp: "190.1.1.1/30",
* },
* directIpv6: {
* equinixIfaceIp: "190::1:1/126",
* },
* });
* const bgp = new equinix.fabric.RoutingProtocol("bgp", {
* connectionUuid: "<same_connection_id_as_first_equinix_fabric_routing_protocol>",
* type: "BGP",
* name: "bgp_rp",
* bgpIpv4: {
* customerPeerIp: "190.1.1.2",
* enabled: true,
* },
* bgpIpv6: {
* customerPeerIp: "190::1:2",
* enabled: true,
* },
* customerAsn: 4532,
* }, {
* dependsOn: [direct],
* });
* ```
*/
class RoutingProtocol extends pulumi.CustomResource {
/**
* Get an existing RoutingProtocol resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new RoutingProtocol(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of RoutingProtocol. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === RoutingProtocol.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["asOverrideEnabled"] = state ? state.asOverrideEnabled : undefined;
resourceInputs["bfd"] = state ? state.bfd : undefined;
resourceInputs["bgpAuthKey"] = state ? state.bgpAuthKey : undefined;
resourceInputs["bgpIpv4"] = state ? state.bgpIpv4 : undefined;
resourceInputs["bgpIpv6"] = state ? state.bgpIpv6 : undefined;
resourceInputs["changeLogs"] = state ? state.changeLogs : undefined;
resourceInputs["changes"] = state ? state.changes : undefined;
resourceInputs["connectionUuid"] = state ? state.connectionUuid : undefined;
resourceInputs["customerAsn"] = state ? state.customerAsn : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["directIpv4"] = state ? state.directIpv4 : undefined;
resourceInputs["directIpv6"] = state ? state.directIpv6 : undefined;
resourceInputs["equinixAsn"] = state ? state.equinixAsn : undefined;
resourceInputs["href"] = state ? state.href : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["operations"] = state ? state.operations : undefined;
resourceInputs["state"] = state ? state.state : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["uuid"] = state ? state.uuid : undefined;
}
else {
const args = argsOrState;
if ((!args || args.connectionUuid === undefined) && !opts.urn) {
throw new Error("Missing required property 'connectionUuid'");
}
resourceInputs["asOverrideEnabled"] = args ? args.asOverrideEnabled : undefined;
resourceInputs["bfd"] = args ? args.bfd : undefined;
resourceInputs["bgpAuthKey"] = args ? args.bgpAuthKey : undefined;
resourceInputs["bgpIpv4"] = args ? args.bgpIpv4 : undefined;
resourceInputs["bgpIpv6"] = args ? args.bgpIpv6 : undefined;
resourceInputs["connectionUuid"] = args ? args.connectionUuid : undefined;
resourceInputs["customerAsn"] = args ? args.customerAsn : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["directIpv4"] = args ? args.directIpv4 : undefined;
resourceInputs["directIpv6"] = args ? args.directIpv6 : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["uuid"] = args ? args.uuid : undefined;
resourceInputs["changeLogs"] = undefined /*out*/;
resourceInputs["changes"] = undefined /*out*/;
resourceInputs["equinixAsn"] = undefined /*out*/;
resourceInputs["href"] = undefined /*out*/;
resourceInputs["operations"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(RoutingProtocol.__pulumiType, name, resourceInputs, opts);
}
}
exports.RoutingProtocol = RoutingProtocol;
/** @internal */
RoutingProtocol.__pulumiType = 'equinix:fabric/routingProtocol:RoutingProtocol';
//# sourceMappingURL=routingProtocol.js.map