@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
156 lines • 6.1 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, { ...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?.arn;
resourceInputs["bgpOptions"] = state?.bgpOptions;
resourceInputs["endpointEniAddress"] = state?.endpointEniAddress;
resourceInputs["endpointEniId"] = state?.endpointEniId;
resourceInputs["peerAddress"] = state?.peerAddress;
resourceInputs["region"] = state?.region;
resourceInputs["routeServerEndpointId"] = state?.routeServerEndpointId;
resourceInputs["routeServerId"] = state?.routeServerId;
resourceInputs["routeServerPeerId"] = state?.routeServerPeerId;
resourceInputs["subnetId"] = state?.subnetId;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["timeouts"] = state?.timeouts;
resourceInputs["vpcId"] = state?.vpcId;
}
else {
const args = argsOrState;
if (args?.peerAddress === undefined && !opts.urn) {
throw new Error("Missing required property 'peerAddress'");
}
if (args?.routeServerEndpointId === undefined && !opts.urn) {
throw new Error("Missing required property 'routeServerEndpointId'");
}
resourceInputs["bgpOptions"] = args?.bgpOptions;
resourceInputs["peerAddress"] = args?.peerAddress;
resourceInputs["region"] = args?.region;
resourceInputs["routeServerEndpointId"] = args?.routeServerEndpointId;
resourceInputs["tags"] = args?.tags;
resourceInputs["timeouts"] = args?.timeouts;
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
;