Try AWS Native preview for resources not in the classic version.
aws.ec2transitgateway.PeeringAttachmentAccepter
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Manages the accepter’s side of an EC2 Transit Gateway Peering Attachment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2transitgateway.PeeringAttachmentAccepter("example", {
transitGatewayAttachmentId: exampleAwsEc2TransitGatewayPeeringAttachment.id,
tags: {
Name: "Example cross-account attachment",
},
});
import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.PeeringAttachmentAccepter("example",
transit_gateway_attachment_id=example_aws_ec2_transit_gateway_peering_attachment["id"],
tags={
"Name": "Example cross-account attachment",
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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(exampleAwsEc2TransitGatewayPeeringAttachment.Id),
Tags: pulumi.StringMap{
"Name": pulumi.String("Example cross-account attachment"),
},
})
if err != nil {
return err
}
return nil
})
}
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 = exampleAwsEc2TransitGatewayPeeringAttachment.Id,
Tags =
{
{ "Name", "Example cross-account attachment" },
},
});
});
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(exampleAwsEc2TransitGatewayPeeringAttachment.id())
.tags(Map.of("Name", "Example cross-account attachment"))
.build());
}
}
resources:
example:
type: aws:ec2transitgateway:PeeringAttachmentAccepter
properties:
transitGatewayAttachmentId: ${exampleAwsEc2TransitGatewayPeeringAttachment.id}
tags:
Name: Example cross-account attachment
Create PeeringAttachmentAccepter Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PeeringAttachmentAccepter(name: string, args: PeeringAttachmentAccepterArgs, opts?: CustomResourceOptions);
@overload
def PeeringAttachmentAccepter(resource_name: str,
args: PeeringAttachmentAccepterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PeeringAttachmentAccepter(resource_name: str,
opts: Optional[ResourceOptions] = None,
transit_gateway_attachment_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewPeeringAttachmentAccepter(ctx *Context, name string, args PeeringAttachmentAccepterArgs, opts ...ResourceOption) (*PeeringAttachmentAccepter, error)
public PeeringAttachmentAccepter(string name, PeeringAttachmentAccepterArgs args, CustomResourceOptions? opts = null)
public PeeringAttachmentAccepter(String name, PeeringAttachmentAccepterArgs args)
public PeeringAttachmentAccepter(String name, PeeringAttachmentAccepterArgs args, CustomResourceOptions options)
type: aws:ec2transitgateway:PeeringAttachmentAccepter
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 PeeringAttachmentAccepterArgs
- 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 PeeringAttachmentAccepterArgs
- 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 PeeringAttachmentAccepterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PeeringAttachmentAccepterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PeeringAttachmentAccepterArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var peeringAttachmentAccepterResource = new Aws.Ec2TransitGateway.PeeringAttachmentAccepter("peeringAttachmentAccepterResource", new()
{
TransitGatewayAttachmentId = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := ec2transitgateway.NewPeeringAttachmentAccepter(ctx, "peeringAttachmentAccepterResource", &ec2transitgateway.PeeringAttachmentAccepterArgs{
TransitGatewayAttachmentId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var peeringAttachmentAccepterResource = new PeeringAttachmentAccepter("peeringAttachmentAccepterResource", PeeringAttachmentAccepterArgs.builder()
.transitGatewayAttachmentId("string")
.tags(Map.of("string", "string"))
.build());
peering_attachment_accepter_resource = aws.ec2transitgateway.PeeringAttachmentAccepter("peeringAttachmentAccepterResource",
transit_gateway_attachment_id="string",
tags={
"string": "string",
})
const peeringAttachmentAccepterResource = new aws.ec2transitgateway.PeeringAttachmentAccepter("peeringAttachmentAccepterResource", {
transitGatewayAttachmentId: "string",
tags: {
string: "string",
},
});
type: aws:ec2transitgateway:PeeringAttachmentAccepter
properties:
tags:
string: string
transitGatewayAttachmentId: string
PeeringAttachmentAccepter Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The PeeringAttachmentAccepter resource accepts the following input properties:
- Transit
Gateway stringAttachment Id - The ID of the EC2 Transit Gateway Peering Attachment to manage.
- 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.
- Transit
Gateway stringAttachment Id - The ID of the EC2 Transit Gateway Peering Attachment to manage.
- 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.
- transit
Gateway StringAttachment Id - The ID of the EC2 Transit Gateway Peering Attachment to manage.
- 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.
- transit
Gateway stringAttachment Id - The ID of the EC2 Transit Gateway Peering Attachment to manage.
- {[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_ strattachment_ id - The ID of the EC2 Transit Gateway Peering Attachment to manage.
- 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.
- transit
Gateway StringAttachment Id - The ID of the EC2 Transit Gateway Peering Attachment to manage.
- 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 PeeringAttachmentAccepter resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Peer
Account stringId - Identifier of the AWS account that owns the EC2 TGW peering.
- Peer
Region string - Peer
Transit stringGateway Id - Identifier of EC2 Transit Gateway to peer with.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Transit
Gateway stringId - Identifier of EC2 Transit Gateway.
- Id string
- The provider-assigned unique ID for this managed resource.
- Peer
Account stringId - Identifier of the AWS account that owns the EC2 TGW peering.
- Peer
Region string - Peer
Transit stringGateway Id - Identifier of EC2 Transit Gateway to peer with.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Transit
Gateway stringId - Identifier of EC2 Transit Gateway.
- id String
- The provider-assigned unique ID for this managed resource.
- peer
Account StringId - Identifier of the AWS account that owns the EC2 TGW peering.
- peer
Region String - peer
Transit StringGateway Id - Identifier of EC2 Transit Gateway to peer with.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - transit
Gateway StringId - Identifier of EC2 Transit Gateway.
- id string
- The provider-assigned unique ID for this managed resource.
- peer
Account stringId - Identifier of the AWS account that owns the EC2 TGW peering.
- peer
Region string - peer
Transit stringGateway Id - Identifier of EC2 Transit Gateway to peer with.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - transit
Gateway stringId - Identifier of EC2 Transit Gateway.
- id str
- The provider-assigned unique ID for this managed resource.
- peer_
account_ strid - Identifier of the AWS account that owns the EC2 TGW peering.
- peer_
region str - peer_
transit_ strgateway_ id - Identifier of EC2 Transit Gateway to peer with.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - transit_
gateway_ strid - Identifier of EC2 Transit Gateway.
- id String
- The provider-assigned unique ID for this managed resource.
- peer
Account StringId - Identifier of the AWS account that owns the EC2 TGW peering.
- peer
Region String - peer
Transit StringGateway Id - Identifier of EC2 Transit Gateway to peer with.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - transit
Gateway StringId - Identifier of EC2 Transit Gateway.
Look up Existing PeeringAttachmentAccepter Resource
Get an existing PeeringAttachmentAccepter 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?: PeeringAttachmentAccepterState, opts?: CustomResourceOptions): PeeringAttachmentAccepter
@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) -> PeeringAttachmentAccepter
func GetPeeringAttachmentAccepter(ctx *Context, name string, id IDInput, state *PeeringAttachmentAccepterState, opts ...ResourceOption) (*PeeringAttachmentAccepter, error)
public static PeeringAttachmentAccepter Get(string name, Input<string> id, PeeringAttachmentAccepterState? state, CustomResourceOptions? opts = null)
public static PeeringAttachmentAccepter get(String name, Output<String> id, PeeringAttachmentAccepterState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Peer
Account stringId - Identifier of the AWS account that owns the EC2 TGW peering.
- Peer
Region string - Peer
Transit stringGateway Id - Identifier of EC2 Transit Gateway to peer with.
- 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. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Transit
Gateway stringAttachment Id - The ID of the EC2 Transit Gateway Peering Attachment to manage.
- Transit
Gateway stringId - Identifier of EC2 Transit Gateway.
- Peer
Account stringId - Identifier of the AWS account that owns the EC2 TGW peering.
- Peer
Region string - Peer
Transit stringGateway Id - Identifier of EC2 Transit Gateway to peer with.
- 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. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Transit
Gateway stringAttachment Id - The ID of the EC2 Transit Gateway Peering Attachment to manage.
- Transit
Gateway stringId - Identifier of EC2 Transit Gateway.
- peer
Account StringId - Identifier of the AWS account that owns the EC2 TGW peering.
- peer
Region String - peer
Transit StringGateway Id - Identifier of EC2 Transit Gateway to peer with.
- 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. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - transit
Gateway StringAttachment Id - The ID of the EC2 Transit Gateway Peering Attachment to manage.
- transit
Gateway StringId - Identifier of EC2 Transit Gateway.
- peer
Account stringId - Identifier of the AWS account that owns the EC2 TGW peering.
- peer
Region string - peer
Transit stringGateway Id - Identifier of EC2 Transit Gateway to peer with.
- {[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. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - transit
Gateway stringAttachment Id - The ID of the EC2 Transit Gateway Peering Attachment to manage.
- transit
Gateway stringId - Identifier of EC2 Transit Gateway.
- peer_
account_ strid - Identifier of the AWS account that owns the EC2 TGW peering.
- peer_
region str - peer_
transit_ strgateway_ id - Identifier of EC2 Transit Gateway to peer with.
- 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. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - transit_
gateway_ strattachment_ id - The ID of the EC2 Transit Gateway Peering Attachment to manage.
- transit_
gateway_ strid - Identifier of EC2 Transit Gateway.
- peer
Account StringId - Identifier of the AWS account that owns the EC2 TGW peering.
- peer
Region String - peer
Transit StringGateway Id - Identifier of EC2 Transit Gateway to peer with.
- 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. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - transit
Gateway StringAttachment Id - The ID of the EC2 Transit Gateway Peering Attachment to manage.
- transit
Gateway StringId - Identifier of EC2 Transit Gateway.
Import
Using pulumi import
, import aws_ec2_transit_gateway_peering_attachment_accepter
using the EC2 Transit Gateway Attachment identifier. For example:
$ pulumi import aws:ec2transitgateway/peeringAttachmentAccepter:PeeringAttachmentAccepter 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.
Try AWS Native preview for resources not in the classic version.