1. Packages
  2. AWS
  3. API Docs
  4. ec2
  5. TransitGatewayPeeringAttachmentAccepter
Viewing docs for AWS v5.43.0 (Older version)
published on Tuesday, Mar 10, 2026 by Pulumi
aws logo
Viewing docs for AWS v5.43.0 (Older version)
published on Tuesday, Mar 10, 2026 by Pulumi
    Deprecated: aws.ec2.TransitGatewayPeeringAttachmentAccepter has been deprecated in favor of aws.ec2transitgateway.PeeringAttachmentAccepter

    Manages the accepter’s side of an EC2 Transit Gateway Peering Attachment.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Ec2TransitGateway.PeeringAttachmentAccepter("example", new()
        {
            TransitGatewayAttachmentId = aws_ec2_transit_gateway_peering_attachment.Example.Id,
            Tags = 
            {
                { "Name", "Example cross-account attachment" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2transitgateway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ec2transitgateway.NewPeeringAttachmentAccepter(ctx, "example", &ec2transitgateway.PeeringAttachmentAccepterArgs{
    			TransitGatewayAttachmentId: pulumi.Any(aws_ec2_transit_gateway_peering_attachment.Example.Id),
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("Example cross-account attachment"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2transitgateway.PeeringAttachmentAccepter;
    import com.pulumi.aws.ec2transitgateway.PeeringAttachmentAccepterArgs;
    import java.util.List;
    import java.util.ArrayList;
    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 PeeringAttachmentAccepter("example", PeeringAttachmentAccepterArgs.builder()        
                .transitGatewayAttachmentId(aws_ec2_transit_gateway_peering_attachment.example().id())
                .tags(Map.of("Name", "Example cross-account attachment"))
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ec2transitgateway.PeeringAttachmentAccepter("example", {
        transitGatewayAttachmentId: aws_ec2_transit_gateway_peering_attachment.example.id,
        tags: {
            Name: "Example cross-account attachment",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ec2transitgateway.PeeringAttachmentAccepter("example",
        transit_gateway_attachment_id=aws_ec2_transit_gateway_peering_attachment["example"]["id"],
        tags={
            "Name": "Example cross-account attachment",
        })
    
    resources:
      example:
        type: aws:ec2transitgateway:PeeringAttachmentAccepter
        properties:
          transitGatewayAttachmentId: ${aws_ec2_transit_gateway_peering_attachment.example.id}
          tags:
            Name: Example cross-account attachment
    

    Create TransitGatewayPeeringAttachmentAccepter Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new TransitGatewayPeeringAttachmentAccepter(name: string, args: TransitGatewayPeeringAttachmentAccepterArgs, opts?: CustomResourceOptions);
    @overload
    def TransitGatewayPeeringAttachmentAccepter(resource_name: str,
                                                args: TransitGatewayPeeringAttachmentAccepterArgs,
                                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def TransitGatewayPeeringAttachmentAccepter(resource_name: str,
                                                opts: Optional[ResourceOptions] = None,
                                                tags: Optional[Mapping[str, str]] = None,
                                                transit_gateway_attachment_id: Optional[str] = None)
    func NewTransitGatewayPeeringAttachmentAccepter(ctx *Context, name string, args TransitGatewayPeeringAttachmentAccepterArgs, opts ...ResourceOption) (*TransitGatewayPeeringAttachmentAccepter, error)
    public TransitGatewayPeeringAttachmentAccepter(string name, TransitGatewayPeeringAttachmentAccepterArgs args, CustomResourceOptions? opts = null)
    public TransitGatewayPeeringAttachmentAccepter(String name, TransitGatewayPeeringAttachmentAccepterArgs args)
    public TransitGatewayPeeringAttachmentAccepter(String name, TransitGatewayPeeringAttachmentAccepterArgs args, CustomResourceOptions options)
    
    type: aws:ec2:TransitGatewayPeeringAttachmentAccepter
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args TransitGatewayPeeringAttachmentAccepterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args TransitGatewayPeeringAttachmentAccepterArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args TransitGatewayPeeringAttachmentAccepterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TransitGatewayPeeringAttachmentAccepterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TransitGatewayPeeringAttachmentAccepterArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    TransitGatewayPeeringAttachmentAccepter Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The TransitGatewayPeeringAttachmentAccepter resource accepts the following input properties:

    TransitGatewayAttachmentId string
    The ID of the EC2 Transit Gateway Peering Attachment to manage.
    Tags Dictionary<string, string>
    Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TransitGatewayAttachmentId string
    The ID of the EC2 Transit Gateway Peering Attachment to manage.
    Tags map[string]string
    Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    transitGatewayAttachmentId String
    The ID of the EC2 Transit Gateway Peering Attachment to manage.
    tags Map<String,String>
    Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    transitGatewayAttachmentId string
    The ID of the EC2 Transit Gateway Peering Attachment to manage.
    tags {[key: string]: string}
    Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    transit_gateway_attachment_id str
    The ID of the EC2 Transit Gateway Peering Attachment to manage.
    tags Mapping[str, str]
    Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    transitGatewayAttachmentId String
    The ID of the EC2 Transit Gateway Peering Attachment to manage.
    tags Map<String>
    Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TransitGatewayPeeringAttachmentAccepter resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    PeerAccountId string
    Identifier of the AWS account that owns the EC2 TGW peering.
    PeerRegion string
    PeerTransitGatewayId string
    Identifier of EC2 Transit Gateway to peer with.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    TransitGatewayId string
    Identifier of EC2 Transit Gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    PeerAccountId string
    Identifier of the AWS account that owns the EC2 TGW peering.
    PeerRegion string
    PeerTransitGatewayId string
    Identifier of EC2 Transit Gateway to peer with.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    TransitGatewayId string
    Identifier of EC2 Transit Gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    peerAccountId String
    Identifier of the AWS account that owns the EC2 TGW peering.
    peerRegion String
    peerTransitGatewayId String
    Identifier of EC2 Transit Gateway to peer with.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    transitGatewayId String
    Identifier of EC2 Transit Gateway.
    id string
    The provider-assigned unique ID for this managed resource.
    peerAccountId string
    Identifier of the AWS account that owns the EC2 TGW peering.
    peerRegion string
    peerTransitGatewayId string
    Identifier of EC2 Transit Gateway to peer with.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    transitGatewayId string
    Identifier of EC2 Transit Gateway.
    id str
    The provider-assigned unique ID for this managed resource.
    peer_account_id str
    Identifier of the AWS account that owns the EC2 TGW peering.
    peer_region str
    peer_transit_gateway_id str
    Identifier of EC2 Transit Gateway to peer with.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    transit_gateway_id str
    Identifier of EC2 Transit Gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    peerAccountId String
    Identifier of the AWS account that owns the EC2 TGW peering.
    peerRegion String
    peerTransitGatewayId String
    Identifier of EC2 Transit Gateway to peer with.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    transitGatewayId String
    Identifier of EC2 Transit Gateway.

    Look up Existing TransitGatewayPeeringAttachmentAccepter Resource

    Get an existing TransitGatewayPeeringAttachmentAccepter resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: TransitGatewayPeeringAttachmentAccepterState, opts?: CustomResourceOptions): TransitGatewayPeeringAttachmentAccepter
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            peer_account_id: Optional[str] = None,
            peer_region: Optional[str] = None,
            peer_transit_gateway_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            transit_gateway_attachment_id: Optional[str] = None,
            transit_gateway_id: Optional[str] = None) -> TransitGatewayPeeringAttachmentAccepter
    func GetTransitGatewayPeeringAttachmentAccepter(ctx *Context, name string, id IDInput, state *TransitGatewayPeeringAttachmentAccepterState, opts ...ResourceOption) (*TransitGatewayPeeringAttachmentAccepter, error)
    public static TransitGatewayPeeringAttachmentAccepter Get(string name, Input<string> id, TransitGatewayPeeringAttachmentAccepterState? state, CustomResourceOptions? opts = null)
    public static TransitGatewayPeeringAttachmentAccepter get(String name, Output<String> id, TransitGatewayPeeringAttachmentAccepterState state, CustomResourceOptions options)
    resources:  _:    type: aws:ec2:TransitGatewayPeeringAttachmentAccepter    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    PeerAccountId string
    Identifier of the AWS account that owns the EC2 TGW peering.
    PeerRegion string
    PeerTransitGatewayId string
    Identifier of EC2 Transit Gateway to peer with.
    Tags Dictionary<string, string>
    Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    TransitGatewayAttachmentId string
    The ID of the EC2 Transit Gateway Peering Attachment to manage.
    TransitGatewayId string
    Identifier of EC2 Transit Gateway.
    PeerAccountId string
    Identifier of the AWS account that owns the EC2 TGW peering.
    PeerRegion string
    PeerTransitGatewayId string
    Identifier of EC2 Transit Gateway to peer with.
    Tags map[string]string
    Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    TransitGatewayAttachmentId string
    The ID of the EC2 Transit Gateway Peering Attachment to manage.
    TransitGatewayId string
    Identifier of EC2 Transit Gateway.
    peerAccountId String
    Identifier of the AWS account that owns the EC2 TGW peering.
    peerRegion String
    peerTransitGatewayId String
    Identifier of EC2 Transit Gateway to peer with.
    tags Map<String,String>
    Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    transitGatewayAttachmentId String
    The ID of the EC2 Transit Gateway Peering Attachment to manage.
    transitGatewayId String
    Identifier of EC2 Transit Gateway.
    peerAccountId string
    Identifier of the AWS account that owns the EC2 TGW peering.
    peerRegion string
    peerTransitGatewayId string
    Identifier of EC2 Transit Gateway to peer with.
    tags {[key: string]: string}
    Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    transitGatewayAttachmentId string
    The ID of the EC2 Transit Gateway Peering Attachment to manage.
    transitGatewayId string
    Identifier of EC2 Transit Gateway.
    peer_account_id str
    Identifier of the AWS account that owns the EC2 TGW peering.
    peer_region str
    peer_transit_gateway_id str
    Identifier of EC2 Transit Gateway to peer with.
    tags Mapping[str, str]
    Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    transit_gateway_attachment_id str
    The ID of the EC2 Transit Gateway Peering Attachment to manage.
    transit_gateway_id str
    Identifier of EC2 Transit Gateway.
    peerAccountId String
    Identifier of the AWS account that owns the EC2 TGW peering.
    peerRegion String
    peerTransitGatewayId String
    Identifier of EC2 Transit Gateway to peer with.
    tags Map<String>
    Key-value tags for the EC2 Transit Gateway Peering Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    transitGatewayAttachmentId String
    The ID of the EC2 Transit Gateway Peering Attachment to manage.
    transitGatewayId String
    Identifier of EC2 Transit Gateway.

    Import

    aws_ec2_transit_gateway_peering_attachment_accepter can be imported by using the EC2 Transit Gateway Attachment identifier, e.g.,

     $ pulumi import aws:ec2/transitGatewayPeeringAttachmentAccepter:TransitGatewayPeeringAttachmentAccepter example tgw-attach-12345678
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    Viewing docs for AWS v5.43.0 (Older version)
    published on Tuesday, Mar 10, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.