@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
156 lines • 6.52 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.RouteServerPeer = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource for managing a VPC (Virtual Private Cloud) Route Server Peer.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.vpc.RouteServerPeer("test", {
* routeServerEndpointId: example.routeServerEndpointId,
* peerAddress: "10.0.1.250",
* bgpOptions: {
* peerAsn: 65200,
* },
* tags: {
* Name: "Appliance 1",
* },
* });
* ```
*
* ### Complete Configuration
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.vpc.RouteServer("test", {
* amazonSideAsn: 4294967294,
* tags: {
* Name: "Test",
* },
* });
* const testVpcRouteServerAssociation = new aws.index.VpcRouteServerAssociation("test", {
* routeServerId: test.routeServerId,
* vpcId: testAwsVpc.id,
* });
* const testRouteServerEndpoint = new aws.vpc.RouteServerEndpoint("test", {
* routeServerId: test.routeServerId,
* subnetId: testAwsSubnet.id,
* tags: {
* Name: "Test Endpoint",
* },
* }, {
* dependsOn: [testVpcRouteServerAssociation],
* });
* const testRouteServerPropagation = new aws.vpc.RouteServerPropagation("test", {
* routeServerId: test.routeServerId,
* routeTableId: testAwsRouteTable.id,
* }, {
* dependsOn: [testVpcRouteServerAssociation],
* });
* const testRouteServerPeer = new aws.vpc.RouteServerPeer("test", {
* routeServerEndpointId: testRouteServerEndpoint.routeServerEndpointId,
* peerAddress: "10.0.1.250",
* bgpOptions: {
* peerAsn: 65000,
* peerLivenessDetection: "bgp-keepalive",
* },
* tags: {
* Name: "Test Appliance",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import VPC (Virtual Private Cloud) Route Server using the `route_server_peer_id`. For example:
*
* ```sh
* $ pulumi import aws:vpc/routeServerPeer:RouteServerPeer example rsp-12345678
* ```
*/
class RouteServerPeer extends pulumi.CustomResource {
/**
* Get an existing RouteServerPeer 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 RouteServerPeer(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of RouteServerPeer. 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'] === RouteServerPeer.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["bgpOptions"] = state ? state.bgpOptions : undefined;
resourceInputs["endpointEniAddress"] = state ? state.endpointEniAddress : undefined;
resourceInputs["endpointEniId"] = state ? state.endpointEniId : undefined;
resourceInputs["peerAddress"] = state ? state.peerAddress : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["routeServerEndpointId"] = state ? state.routeServerEndpointId : undefined;
resourceInputs["routeServerId"] = state ? state.routeServerId : undefined;
resourceInputs["routeServerPeerId"] = state ? state.routeServerPeerId : undefined;
resourceInputs["subnetId"] = state ? state.subnetId : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
resourceInputs["timeouts"] = state ? state.timeouts : undefined;
resourceInputs["vpcId"] = state ? state.vpcId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.peerAddress === undefined) && !opts.urn) {
throw new Error("Missing required property 'peerAddress'");
}
if ((!args || args.routeServerEndpointId === undefined) && !opts.urn) {
throw new Error("Missing required property 'routeServerEndpointId'");
}
resourceInputs["bgpOptions"] = args ? args.bgpOptions : undefined;
resourceInputs["peerAddress"] = args ? args.peerAddress : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["routeServerEndpointId"] = args ? args.routeServerEndpointId : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["timeouts"] = args ? args.timeouts : undefined;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["endpointEniAddress"] = undefined /*out*/;
resourceInputs["endpointEniId"] = undefined /*out*/;
resourceInputs["routeServerId"] = undefined /*out*/;
resourceInputs["routeServerPeerId"] = undefined /*out*/;
resourceInputs["subnetId"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
resourceInputs["vpcId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(RouteServerPeer.__pulumiType, name, resourceInputs, opts);
}
}
exports.RouteServerPeer = RouteServerPeer;
/** @internal */
RouteServerPeer.__pulumiType = 'aws:vpc/routeServerPeer:RouteServerPeer';
//# sourceMappingURL=routeServerPeer.js.map