RouteServerPeer class

Provides a resource for managing a VPC Route Server Peer.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = new aws.vpc.RouteServerPeer("test", {
    bgpOptions: {
        peerAsn: 65200,
    },
    routeServerEndpointId: example.routeServerEndpointId,
    peerAddress: "10.0.1.250",
    tags: {
        Name: "Appliance 1",
    },
});
import pulumi
import pulumi_aws as aws

test = aws.vpc.RouteServerPeer("test",
    bgp_options={
        "peer_asn": 65200,
    },
    route_server_endpoint_id=example["routeServerEndpointId"],
    peer_address="10.0.1.250",
    tags={
        "Name": "Appliance 1",
    })
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var test = new Aws.Vpc.RouteServerPeer("test", new()
    {
        BgpOptions = new Aws.Vpc.Inputs.RouteServerPeerBgpOptionsArgs
        {
            PeerAsn = 65200,
        },
        RouteServerEndpointId = example.RouteServerEndpointId,
        PeerAddress = "10.0.1.250",
        Tags =
        {
            { "Name", "Appliance 1" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/vpc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vpc.NewRouteServerPeer(ctx, "test", &vpc.RouteServerPeerArgs{
			BgpOptions: &vpc.RouteServerPeerBgpOptionsArgs{
				PeerAsn: pulumi.Int(65200),
			},
			RouteServerEndpointId: pulumi.Any(example.RouteServerEndpointId),
			PeerAddress:           pulumi.String("10.0.1.250"),
			Tags: pulumi.StringMap{
				"Name": pulumi.String("Appliance 1"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_vpc_routeserverpeer" "test" {
  bgp_options = {
    peer_asn = 65200
  }
  route_server_endpoint_id = example.routeServerEndpointId
  peer_address             = "10.0.1.250"
  tags = {
    "Name" = "Appliance 1"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.vpc.RouteServerPeer;
import com.pulumi.aws.vpc.RouteServerPeerArgs;
import com.pulumi.aws.vpc.inputs.RouteServerPeerBgpOptionsArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var test = new RouteServerPeer("test", RouteServerPeerArgs.builder()
            .bgpOptions(RouteServerPeerBgpOptionsArgs.builder()
                .peerAsn(65200)
                .build())
            .routeServerEndpointId(example.routeServerEndpointId())
            .peerAddress("10.0.1.250")
            .tags(Map.of("Name", "Appliance 1"))
            .build());

    }
}
resources:
  test:
    type: aws:vpc:RouteServerPeer
    properties:
      bgpOptions:
        peerAsn: 65200
      routeServerEndpointId: ${example.routeServerEndpointId}
      peerAddress: 10.0.1.250
      tags:
        Name: Appliance 1

Complete Configuration

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 testRouteServerVpcAssociation = new aws.vpc.RouteServerVpcAssociation("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: [testRouteServerVpcAssociation],
});
const testRouteServerPropagation = new aws.vpc.RouteServerPropagation("test", {
    routeServerId: test.routeServerId,
    routeTableId: testAwsRouteTable.id,
}, {
    dependsOn: [testRouteServerVpcAssociation],
});
const testRouteServerPeer = new aws.vpc.RouteServerPeer("test", {
    bgpOptions: {
        peerAsn: 65000,
        peerLivenessDetection: "bgp-keepalive",
    },
    routeServerEndpointId: testRouteServerEndpoint.routeServerEndpointId,
    peerAddress: "10.0.1.250",
    tags: {
        Name: "Test Appliance",
    },
});
import pulumi
import pulumi_aws as aws

test = aws.vpc.RouteServer("test",
    amazon_side_asn=int(4294967294),
    tags={
        "Name": "Test",
    })
test_route_server_vpc_association = aws.vpc.RouteServerVpcAssociation("test",
    route_server_id=test.route_server_id,
    vpc_id=test_aws_vpc["id"])
test_route_server_endpoint = aws.vpc.RouteServerEndpoint("test",
    route_server_id=test.route_server_id,
    subnet_id=test_aws_subnet["id"],
    tags={
        "Name": "Test Endpoint",
    },
    opts = pulumi.ResourceOptions(depends_on=[test_route_server_vpc_association]))
test_route_server_propagation = aws.vpc.RouteServerPropagation("test",
    route_server_id=test.route_server_id,
    route_table_id=test_aws_route_table["id"],
    opts = pulumi.ResourceOptions(depends_on=[test_route_server_vpc_association]))
test_route_server_peer = aws.vpc.RouteServerPeer("test",
    bgp_options={
        "peer_asn": 65000,
        "peer_liveness_detection": "bgp-keepalive",
    },
    route_server_endpoint_id=test_route_server_endpoint.route_server_endpoint_id,
    peer_address="10.0.1.250",
    tags={
        "Name": "Test Appliance",
    })
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var test = new Aws.Vpc.RouteServer("test", new()
    {
        AmazonSideAsn = 4294967294,
        Tags =
        {
            { "Name", "Test" },
        },
    });

    var testRouteServerVpcAssociation = new Aws.Vpc.RouteServerVpcAssociation("test", new()
    {
        RouteServerId = test.RouteServerId,
        VpcId = testAwsVpc.Id,
    });

    var testRouteServerEndpoint = new Aws.Vpc.RouteServerEndpoint("test", new()
    {
        RouteServerId = test.RouteServerId,
        SubnetId = testAwsSubnet.Id,
        Tags =
        {
            { "Name", "Test Endpoint" },
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            testRouteServerVpcAssociation,
        },
    });

    var testRouteServerPropagation = new Aws.Vpc.RouteServerPropagation("test", new()
    {
        RouteServerId = test.RouteServerId,
        RouteTableId = testAwsRouteTable.Id,
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            testRouteServerVpcAssociation,
        },
    });

    var testRouteServerPeer = new Aws.Vpc.RouteServerPeer("test", new()
    {
        BgpOptions = new Aws.Vpc.Inputs.RouteServerPeerBgpOptionsArgs
        {
            PeerAsn = 65000,
            PeerLivenessDetection = "bgp-keepalive",
        },
        RouteServerEndpointId = testRouteServerEndpoint.RouteServerEndpointId,
        PeerAddress = "10.0.1.250",
        Tags =
        {
            { "Name", "Test Appliance" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/vpc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		test, err := vpc.NewRouteServer(ctx, "test", &vpc.RouteServerArgs{
			AmazonSideAsn: pulumi.Int(4294967294),
			Tags: pulumi.StringMap{
				"Name": pulumi.String("Test"),
			},
		})
		if err != nil {
			return err
		}
		testRouteServerVpcAssociation, err := vpc.NewRouteServerVpcAssociation(ctx, "test", &vpc.RouteServerVpcAssociationArgs{
			RouteServerId: test.RouteServerId,
			VpcId:         pulumi.Any(testAwsVpc.Id),
		})
		if err != nil {
			return err
		}
		testRouteServerEndpoint, err := vpc.NewRouteServerEndpoint(ctx, "test", &vpc.RouteServerEndpointArgs{
			RouteServerId: test.RouteServerId,
			SubnetId:      pulumi.Any(testAwsSubnet.Id),
			Tags: pulumi.StringMap{
				"Name": pulumi.String("Test Endpoint"),
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			testRouteServerVpcAssociation,
		}))
		if err != nil {
			return err
		}
		_, err = vpc.NewRouteServerPropagation(ctx, "test", &vpc.RouteServerPropagationArgs{
			RouteServerId: test.RouteServerId,
			RouteTableId:  pulumi.Any(testAwsRouteTable.Id),
		}, pulumi.DependsOn([]pulumi.Resource{
			testRouteServerVpcAssociation,
		}))
		if err != nil {
			return err
		}
		_, err = vpc.NewRouteServerPeer(ctx, "test", &vpc.RouteServerPeerArgs{
			BgpOptions: &vpc.RouteServerPeerBgpOptionsArgs{
				PeerAsn:               pulumi.Int(65000),
				PeerLivenessDetection: pulumi.String("bgp-keepalive"),
			},
			RouteServerEndpointId: testRouteServerEndpoint.RouteServerEndpointId,
			PeerAddress:           pulumi.String("10.0.1.250"),
			Tags: pulumi.StringMap{
				"Name": pulumi.String("Test Appliance"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_vpc_routeserver" "test" {
  amazon_side_asn = 4294967294
  tags = {
    "Name" = "Test"
  }
}
resource "aws_vpc_routeservervpcassociation" "test" {
  route_server_id = aws_vpc_routeserver.test.route_server_id
  vpc_id          = testAwsVpc.id
}
resource "aws_vpc_routeserverendpoint" "test" {
  depends_on      = [aws_vpc_routeservervpcassociation.test]
  route_server_id = aws_vpc_routeserver.test.route_server_id
  subnet_id       = testAwsSubnet.id
  tags = {
    "Name" = "Test Endpoint"
  }
}
resource "aws_vpc_routeserverpropagation" "test" {
  depends_on      = [aws_vpc_routeservervpcassociation.test]
  route_server_id = aws_vpc_routeserver.test.route_server_id
  route_table_id  = testAwsRouteTable.id
}
resource "aws_vpc_routeserverpeer" "test" {
  bgp_options = {
    peer_asn                = 65000
    peer_liveness_detection = "bgp-keepalive"
  }
  route_server_endpoint_id = aws_vpc_routeserverendpoint.test.route_server_endpoint_id
  peer_address             = "10.0.1.250"
  tags = {
    "Name" = "Test Appliance"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.vpc.RouteServer;
import com.pulumi.aws.vpc.RouteServerArgs;
import com.pulumi.aws.vpc.RouteServerVpcAssociation;
import com.pulumi.aws.vpc.RouteServerVpcAssociationArgs;
import com.pulumi.aws.vpc.RouteServerEndpoint;
import com.pulumi.aws.vpc.RouteServerEndpointArgs;
import com.pulumi.aws.vpc.RouteServerPropagation;
import com.pulumi.aws.vpc.RouteServerPropagationArgs;
import com.pulumi.aws.vpc.RouteServerPeer;
import com.pulumi.aws.vpc.RouteServerPeerArgs;
import com.pulumi.aws.vpc.inputs.RouteServerPeerBgpOptionsArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var test = new RouteServer("test", RouteServerArgs.builder()
            .amazonSideAsn(4294967294)
            .tags(Map.of("Name", "Test"))
            .build());

        var testRouteServerVpcAssociation = new RouteServerVpcAssociation("testRouteServerVpcAssociation", RouteServerVpcAssociationArgs.builder()
            .routeServerId(test.routeServerId())
            .vpcId(testAwsVpc.id())
            .build());

        var testRouteServerEndpoint = new RouteServerEndpoint("testRouteServerEndpoint", RouteServerEndpointArgs.builder()
            .routeServerId(test.routeServerId())
            .subnetId(testAwsSubnet.id())
            .tags(Map.of("Name", "Test Endpoint"))
            .build(), CustomResourceOptions.builder()
                .dependsOn(testRouteServerVpcAssociation)
                .build());

        var testRouteServerPropagation = new RouteServerPropagation("testRouteServerPropagation", RouteServerPropagationArgs.builder()
            .routeServerId(test.routeServerId())
            .routeTableId(testAwsRouteTable.id())
            .build(), CustomResourceOptions.builder()
                .dependsOn(testRouteServerVpcAssociation)
                .build());

        var testRouteServerPeer = new RouteServerPeer("testRouteServerPeer", RouteServerPeerArgs.builder()
            .bgpOptions(RouteServerPeerBgpOptionsArgs.builder()
                .peerAsn(65000)
                .peerLivenessDetection("bgp-keepalive")
                .build())
            .routeServerEndpointId(testRouteServerEndpoint.routeServerEndpointId())
            .peerAddress("10.0.1.250")
            .tags(Map.of("Name", "Test Appliance"))
            .build());

    }
}
resources:
  test:
    type: aws:vpc:RouteServer
    properties:
      amazonSideAsn: 4.294967294e+09
      tags:
        Name: Test
  testRouteServerVpcAssociation:
    type: aws:vpc:RouteServerVpcAssociation
    name: test
    properties:
      routeServerId: ${test.routeServerId}
      vpcId: ${testAwsVpc.id}
  testRouteServerEndpoint:
    type: aws:vpc:RouteServerEndpoint
    name: test
    properties:
      routeServerId: ${test.routeServerId}
      subnetId: ${testAwsSubnet.id}
      tags:
        Name: Test Endpoint
    options:
      dependsOn:
        - ${testRouteServerVpcAssociation}
  testRouteServerPropagation:
    type: aws:vpc:RouteServerPropagation
    name: test
    properties:
      routeServerId: ${test.routeServerId}
      routeTableId: ${testAwsRouteTable.id}
    options:
      dependsOn:
        - ${testRouteServerVpcAssociation}
  testRouteServerPeer:
    type: aws:vpc:RouteServerPeer
    name: test
    properties:
      bgpOptions:
        peerAsn: 65000
        peerLivenessDetection: bgp-keepalive
      routeServerEndpointId: ${testRouteServerEndpoint.routeServerEndpointId}
      peerAddress: 10.0.1.250
      tags:
        Name: Test Appliance

Import

Using pulumi import, import VPC Route Server using the routeServerPeerId. For example:

$ pulumi import aws:vpc/routeServerPeer:RouteServerPeer example rsp-12345678

Constructors

RouteServerPeer(String name, {RouteServerPeerArgs? args, CustomResourceOptions? options})
Creates a new RouteServerPeer. name The Pulumi resource name. args Arguments used to configure this RouteServerPeer. The set of arguments for RouteServerPeer. options Resource options controlling this resource's behavior.
RouteServerPeer.reference(String urn)
Creates a typed reference to an existing RouteServerPeer resource.

Properties

arn ↔ Output<String>
The ARN of the route server peer.
latefinal
bgpOptions ↔ Output<RouteServerPeerBgpOptions>
The BGP options for the peer, including ASN (Autonomous System Number) and BFD (Bidrectional Forwarding Detection) settings. Configuration block with BGP Options configuration Detailed below
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
endpointEniAddress ↔ Output<String>
The IP address of the Elastic network interface for the route server endpoint.
latefinal
endpointEniId ↔ Output<String>
The ID of the Elastic network interface for the route server endpoint.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
peerAddress ↔ Output<String>
The IPv4 address of the peer device.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
routeServerEndpointId ↔ Output<String>
The ID of the route server endpoint for which to create a peer.
latefinal
routeServerId ↔ Output<String>
The ID of the route server associated with this peer.
latefinal
routeServerPeerId ↔ Output<String>
The unique identifier of the route server peer.
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subnetId ↔ Output<String>
The ID of the subnet containing the route server peer.
latefinal
tags ↔ Output<Map<String, String>?>
A map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
timeouts ↔ Output<RouteServerPeerTimeouts?>
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited
vpcId ↔ Output<String>
The ID of the VPC containing the route server peer.
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {RouteServerPeerState? state, CustomResourceOptions? options}) → RouteServerPeer
Gets an existing RouteServerPeer resource's state with the given name and id.