ConnectPeer class
Manages an EC2 Transit Gateway Connect Peer.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2transitgateway.Connect("example", {
transportAttachmentId: exampleAwsEc2TransitGatewayVpcAttachment.id,
transitGatewayId: exampleAwsEc2TransitGateway.id,
});
const exampleConnectPeer = new aws.ec2transitgateway.ConnectPeer("example", {
peerAddress: "10.1.2.3",
insideCidrBlocks: ["169.254.100.0/29"],
transitGatewayAttachmentId: example.id,
});
import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.Connect("example",
transport_attachment_id=example_aws_ec2_transit_gateway_vpc_attachment["id"],
transit_gateway_id=example_aws_ec2_transit_gateway["id"])
example_connect_peer = aws.ec2transitgateway.ConnectPeer("example",
peer_address="10.1.2.3",
inside_cidr_blocks=["169.254.100.0/29"],
transit_gateway_attachment_id=example.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Ec2TransitGateway.Connect("example", new()
{
TransportAttachmentId = exampleAwsEc2TransitGatewayVpcAttachment.Id,
TransitGatewayId = exampleAwsEc2TransitGateway.Id,
});
var exampleConnectPeer = new Aws.Ec2TransitGateway.ConnectPeer("example", new()
{
PeerAddress = "10.1.2.3",
InsideCidrBlocks = new[]
{
"169.254.100.0/29",
},
TransitGatewayAttachmentId = example.Id,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2transitgateway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := ec2transitgateway.NewConnect(ctx, "example", &ec2transitgateway.ConnectArgs{
TransportAttachmentId: pulumi.Any(exampleAwsEc2TransitGatewayVpcAttachment.Id),
TransitGatewayId: pulumi.Any(exampleAwsEc2TransitGateway.Id),
})
if err != nil {
return err
}
_, err = ec2transitgateway.NewConnectPeer(ctx, "example", &ec2transitgateway.ConnectPeerArgs{
PeerAddress: pulumi.String("10.1.2.3"),
InsideCidrBlocks: pulumi.StringArray{
pulumi.String("169.254.100.0/29"),
},
TransitGatewayAttachmentId: example.ID().ToIDOutput().ToStringOutput(),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_ec2transitgateway_connect" "example" {
transport_attachment_id = exampleAwsEc2TransitGatewayVpcAttachment.id
transit_gateway_id = exampleAwsEc2TransitGateway.id
}
resource "aws_ec2transitgateway_connectpeer" "example" {
peer_address = "10.1.2.3"
inside_cidr_blocks = ["169.254.100.0/29"]
transit_gateway_attachment_id = aws_ec2transitgateway_connect.example.id
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2transitgateway.Connect;
import com.pulumi.aws.ec2transitgateway.ConnectArgs;
import com.pulumi.aws.ec2transitgateway.ConnectPeer;
import com.pulumi.aws.ec2transitgateway.ConnectPeerArgs;
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 example = new Connect("example", ConnectArgs.builder()
.transportAttachmentId(exampleAwsEc2TransitGatewayVpcAttachment.id())
.transitGatewayId(exampleAwsEc2TransitGateway.id())
.build());
var exampleConnectPeer = new ConnectPeer("exampleConnectPeer", ConnectPeerArgs.builder()
.peerAddress("10.1.2.3")
.insideCidrBlocks("169.254.100.0/29")
.transitGatewayAttachmentId(example.id())
.build());
}
}
resources:
example:
type: aws:ec2transitgateway:Connect
properties:
transportAttachmentId: ${exampleAwsEc2TransitGatewayVpcAttachment.id}
transitGatewayId: ${exampleAwsEc2TransitGateway.id}
exampleConnectPeer:
type: aws:ec2transitgateway:ConnectPeer
name: example
properties:
peerAddress: 10.1.2.3
insideCidrBlocks:
- 169.254.100.0/29
transitGatewayAttachmentId: ${example.id}
Import
Using pulumi import, import aws.ec2transitgateway.ConnectPeer using the EC2 Transit Gateway Connect Peer identifier. For example:
$ pulumi import aws:ec2transitgateway/connectPeer:ConnectPeer example tgw-connect-peer-12345678
Constructors
- ConnectPeer(String name, {ConnectPeerArgs? args, CustomResourceOptions? options})
-
Creates a new ConnectPeer.
nameThe Pulumi resource name.argsArguments used to configure this ConnectPeer. The set of arguments for ConnectPeer.optionsResource options controlling this resource's behavior. - ConnectPeer.reference(String urn)
- Creates a typed reference to an existing ConnectPeer resource.
Properties
-
arn
↔ Output<
String> -
EC2 Transit Gateway Connect Peer ARN
latefinal
-
bgpAsn
↔ Output<
String> -
The BGP ASN number assigned customer device. If not provided, it will use the same BGP ASN as is associated with Transit Gateway.
latefinal
-
bgpPeerAddress
↔ Output<
String> -
The IP address assigned to customer device, which is used as BGP IP address.
latefinal
-
bgpTransitGatewayAddresses
↔ Output<
List< String> > -
The IP addresses assigned to Transit Gateway, which are used as BGP IP addresses.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
-
insideCidrBlocks
↔ Output<
List< String> > -
The CIDR block that will be used for addressing within the tunnel. It must contain exactly one IPv4 CIDR block and up to one IPv6 CIDR block. The IPv4 CIDR block must be /29 size and must be within 169.254.0.0/16 range, with exception of: 169.254.0.0/29, 169.254.1.0/29, 169.254.2.0/29, 169.254.3.0/29, 169.254.4.0/29, 169.254.5.0/29, 169.254.169.248/29. The IPv6 CIDR block must be /125 size and must be within fd00::/8. The first IP from each CIDR block is assigned for customer gateway, the second and third is for Transit Gateway (An example: from range 169.254.100.0/29, .1 is assigned to customer gateway and .2 and .3 are assigned to Transit Gateway)
latefinal
- 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 IP addressed assigned to customer device, which will be used as tunnel endpoint. It can be IPv4 or IPv6 address, but must be the same address family as
transitGatewayAddresslatefinal -
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
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Key-value tags for the EC2 Transit Gateway Connect Peer. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
A map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
transitGatewayAddress
↔ Output<
String> -
The IP address assigned to Transit Gateway, which will be used as tunnel endpoint. This address must be from associated Transit Gateway CIDR block. The address must be from the same address family as
peerAddress. If not set explicitly, it will be selected from associated Transit Gateway CIDR blockslatefinal -
transitGatewayAttachmentId
↔ Output<
String> -
The Transit Gateway Connect
latefinal
-
urn
↔ Output<
String> -
latefinalinherited
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, {ConnectPeerState? state, CustomResourceOptions? options}) → ConnectPeer -
Gets an existing ConnectPeer resource's state with the given
nameandid.