VpcAttachmentAccepter class
Manages the accepter's side of an EC2 Transit Gateway VPC Attachment.
When a cross-account (requester's AWS account differs from the accepter's AWS account) EC2 Transit Gateway VPC Attachment
is created, an EC2 Transit Gateway VPC Attachment resource is automatically created in the accepter's account.
The requester can use the aws.ec2transitgateway.VpcAttachment resource to manage its side of the connection
and the accepter can use the aws.ec2transitgateway.VpcAttachmentAccepter resource to "adopt" its side of the
connection into management.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2transitgateway.VpcAttachmentAccepter("example", {
transitGatewayAttachmentId: exampleAwsEc2TransitGatewayVpcAttachment.id,
tags: {
Name: "Example cross-account attachment",
},
});
import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.VpcAttachmentAccepter("example",
transit_gateway_attachment_id=example_aws_ec2_transit_gateway_vpc_attachment["id"],
tags={
"Name": "Example cross-account attachment",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Ec2TransitGateway.VpcAttachmentAccepter("example", new()
{
TransitGatewayAttachmentId = exampleAwsEc2TransitGatewayVpcAttachment.Id,
Tags =
{
{ "Name", "Example cross-account attachment" },
},
});
});
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 {
_, err := ec2transitgateway.NewVpcAttachmentAccepter(ctx, "example", &ec2transitgateway.VpcAttachmentAccepterArgs{
TransitGatewayAttachmentId: pulumi.Any(exampleAwsEc2TransitGatewayVpcAttachment.Id),
Tags: pulumi.StringMap{
"Name": pulumi.String("Example cross-account attachment"),
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_ec2transitgateway_vpcattachmentaccepter" "example" {
transit_gateway_attachment_id = exampleAwsEc2TransitGatewayVpcAttachment.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.VpcAttachmentAccepter;
import com.pulumi.aws.ec2transitgateway.VpcAttachmentAccepterArgs;
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 VpcAttachmentAccepter("example", VpcAttachmentAccepterArgs.builder()
.transitGatewayAttachmentId(exampleAwsEc2TransitGatewayVpcAttachment.id())
.tags(Map.of("Name", "Example cross-account attachment"))
.build());
}
}
resources:
example:
type: aws:ec2transitgateway:VpcAttachmentAccepter
properties:
transitGatewayAttachmentId: ${exampleAwsEc2TransitGatewayVpcAttachment.id}
tags:
Name: Example cross-account attachment
Import
Using pulumi import, import aws.ec2transitgateway.VpcAttachmentAccepter using the EC2 Transit Gateway Attachment identifier. For example:
$ pulumi import aws:ec2transitgateway/vpcAttachmentAccepter:VpcAttachmentAccepter example tgw-attach-12345678
Constructors
- VpcAttachmentAccepter(String name, {VpcAttachmentAccepterArgs? args, CustomResourceOptions? options})
-
Creates a new VpcAttachmentAccepter.
nameThe Pulumi resource name.argsArguments used to configure this VpcAttachmentAccepter. The set of arguments for VpcAttachmentAccepter.optionsResource options controlling this resource's behavior. - VpcAttachmentAccepter.reference(String urn)
- Creates a typed reference to an existing VpcAttachmentAccepter resource.
Properties
-
applianceModeSupport
↔ Output<
String> -
Whether Appliance Mode support is enabled. Valid values:
disable,enable.latefinal -
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
dnsSupport
↔ Output<
String> -
Whether DNS support is enabled. Valid values:
disable,enable.latefinal - hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
-
ipv6Support
↔ Output<
String> -
Whether IPv6 support is enabled. Valid values:
disable,enable.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
-
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
-
securityGroupReferencingSupport
↔ Output<
String> -
Whether Security Group Referencing Support is enabled. Valid values:
disable,enable.latefinal -
subnetIds
↔ Output<
List< String> > -
Identifiers of EC2 Subnets.
latefinal
-
Key-value tags for the EC2 Transit Gateway VPC Attachment. 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
-
transitGatewayAttachmentId
↔ Output<
String> -
The ID of the EC2 Transit Gateway Attachment to manage.
latefinal
-
transitGatewayDefaultRouteTableAssociation
↔ Output<
bool?> -
Boolean whether the VPC Attachment should be associated with the EC2 Transit Gateway association default route table. Default value:
true.latefinal -
transitGatewayDefaultRouteTablePropagation
↔ Output<
bool?> -
Boolean whether the VPC Attachment should propagate routes with the EC2 Transit Gateway propagation default route table. Default value:
true.latefinal -
transitGatewayId
↔ Output<
String> -
Identifier of EC2 Transit Gateway.
latefinal
-
urn
↔ Output<
String> -
latefinalinherited
-
vpcId
↔ Output<
String> -
Identifier of EC2 VPC.
latefinal
-
vpcOwnerId
↔ Output<
String> -
Identifier of the AWS account that owns the EC2 VPC.
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, {VpcAttachmentAccepterState? state, CustomResourceOptions? options}) → VpcAttachmentAccepter -
Gets an existing VpcAttachmentAccepter resource's state with the given
nameandid.