VpcAttachmentArgs

data class VpcAttachmentArgs(val applianceModeSupport: Output<String>? = null, val dnsSupport: Output<String>? = null, val ipv6Support: Output<String>? = null, val securityGroupReferencingSupport: Output<String>? = null, val subnetIds: Output<List<String>>? = null, val tags: Output<Map<String, String>>? = null, val transitGatewayDefaultRouteTableAssociation: Output<Boolean>? = null, val transitGatewayDefaultRouteTablePropagation: Output<Boolean>? = null, val transitGatewayId: Output<String>? = null, val vpcId: Output<String>? = null) : ConvertibleToJava<VpcAttachmentArgs>

Manages an EC2 Transit Gateway VPC Attachment. For examples of custom route table association and propagation, see the EC2 Transit Gateway Networking Examples Guide.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2transitgateway.VpcAttachment("example", {
subnetIds: [exampleAwsSubnet&#46;id],
transitGatewayId: exampleAwsEc2TransitGateway.id,
vpcId: exampleAwsVpc.id,
});
import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.VpcAttachment("example",
subnet_ids=[example_aws_subnet["id"]],
transit_gateway_id=example_aws_ec2_transit_gateway["id"],
vpc_id=example_aws_vpc["id"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Ec2TransitGateway.VpcAttachment("example", new()
{
SubnetIds = new[]
{
exampleAwsSubnet.Id,
},
TransitGatewayId = exampleAwsEc2TransitGateway.Id,
VpcId = exampleAwsVpc.Id,
});
});
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.NewVpcAttachment(ctx, "example", &ec2transitgateway.VpcAttachmentArgs{
SubnetIds: pulumi.StringArray{
exampleAwsSubnet.Id,
},
TransitGatewayId: pulumi.Any(exampleAwsEc2TransitGateway.Id),
VpcId: pulumi.Any(exampleAwsVpc.Id),
})
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.VpcAttachment;
import com.pulumi.aws.ec2transitgateway.VpcAttachmentArgs;
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 VpcAttachment("example", VpcAttachmentArgs.builder()
.subnetIds(exampleAwsSubnet.id())
.transitGatewayId(exampleAwsEc2TransitGateway.id())
.vpcId(exampleAwsVpc.id())
.build());
}
}
resources:
example:
type: aws:ec2transitgateway:VpcAttachment
properties:
subnetIds:
- ${exampleAwsSubnet.id}
transitGatewayId: ${exampleAwsEc2TransitGateway.id}
vpcId: ${exampleAwsVpc.id}

Import

Using pulumi import, import aws_ec2_transit_gateway_vpc_attachment using the EC2 Transit Gateway Attachment identifier. For example:

$ pulumi import aws:ec2transitgateway/vpcAttachment:VpcAttachment example tgw-attach-12345678

Constructors

Link copied to clipboard
constructor(applianceModeSupport: Output<String>? = null, dnsSupport: Output<String>? = null, ipv6Support: Output<String>? = null, securityGroupReferencingSupport: Output<String>? = null, subnetIds: Output<List<String>>? = null, tags: Output<Map<String, String>>? = null, transitGatewayDefaultRouteTableAssociation: Output<Boolean>? = null, transitGatewayDefaultRouteTablePropagation: Output<Boolean>? = null, transitGatewayId: Output<String>? = null, vpcId: Output<String>? = null)

Properties

Link copied to clipboard
val applianceModeSupport: Output<String>? = null

Whether Appliance Mode support is enabled. If enabled, a traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. Valid values: disable, enable. Default value: disable.

Link copied to clipboard
val dnsSupport: Output<String>? = null

Whether DNS support is enabled. Valid values: disable, enable. Default value: enable.

Link copied to clipboard
val ipv6Support: Output<String>? = null

Whether IPv6 support is enabled. Valid values: disable, enable. Default value: disable.

Link copied to clipboard

Whether Security Group Referencing Support is enabled. Valid values: disable, enable.

Link copied to clipboard
val subnetIds: Output<List<String>>? = null

Identifiers of EC2 Subnets.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Key-value tags for the EC2 Transit Gateway VPC Attachment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Boolean whether the VPC Attachment should be associated with the EC2 Transit Gateway association default route table. This cannot be configured or perform drift detection with Resource Access Manager shared EC2 Transit Gateways. Default value: true.

Boolean whether the VPC Attachment should propagate routes with the EC2 Transit Gateway propagation default route table. This cannot be configured or perform drift detection with Resource Access Manager shared EC2 Transit Gateways. Default value: true.

Link copied to clipboard
val transitGatewayId: Output<String>? = null

Identifier of EC2 Transit Gateway.

Link copied to clipboard
val vpcId: Output<String>? = null

Identifier of EC2 VPC.

Functions

Link copied to clipboard
open override fun toJava(): VpcAttachmentArgs