VpcAttachment

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

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Ec2TransitGateway.VpcAttachment("example", new Aws.Ec2TransitGateway.VpcAttachmentArgs
        {
            SubnetIds = 
            {
                aws_subnet.Example.Id,
            },
            TransitGatewayId = aws_ec2_transit_gateway.Example.Id,
            VpcId = aws_vpc.Example.Id,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2transitgateway"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ec2transitgateway.NewVpcAttachment(ctx, "example", &ec2transitgateway.VpcAttachmentArgs{
            SubnetIds: pulumi.StringArray{
                pulumi.String(aws_subnet.Example.Id),
            },
            TransitGatewayId: pulumi.String(aws_ec2_transit_gateway.Example.Id),
            VpcId:            pulumi.String(aws_vpc.Example.Id),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ec2transitgateway.VpcAttachment("example",
    subnet_ids=[aws_subnet["example"]["id"]],
    transit_gateway_id=aws_ec2_transit_gateway["example"]["id"],
    vpc_id=aws_vpc["example"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.ec2transitgateway.VpcAttachment("example", {
    subnetIds: [aws_subnet_example.id],
    transitGatewayId: aws_ec2_transit_gateway_example.id,
    vpcId: aws_vpc_example.id,
});

Create a VpcAttachment Resource

def VpcAttachment(resource_name, opts=None, dns_support=None, ipv6_support=None, subnet_ids=None, tags=None, transit_gateway_default_route_table_association=None, transit_gateway_default_route_table_propagation=None, transit_gateway_id=None, vpc_id=None, __props__=None);
name string
The unique name of the resource.
args VpcAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args VpcAttachmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VpcAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

VpcAttachment Resource Properties

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

Inputs

The VpcAttachment resource accepts the following input properties:

SubnetIds List<string>

Identifiers of EC2 Subnets.

TransitGatewayId string

Identifier of EC2 Transit Gateway.

VpcId string

Identifier of EC2 VPC.

DnsSupport string

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

Ipv6Support string

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

Tags Dictionary<string, string>

Key-value tags for the EC2 Transit Gateway VPC Attachment.

TransitGatewayDefaultRouteTableAssociation bool

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.

TransitGatewayDefaultRouteTablePropagation bool

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.

SubnetIds []string

Identifiers of EC2 Subnets.

TransitGatewayId string

Identifier of EC2 Transit Gateway.

VpcId string

Identifier of EC2 VPC.

DnsSupport string

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

Ipv6Support string

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

Tags map[string]string

Key-value tags for the EC2 Transit Gateway VPC Attachment.

TransitGatewayDefaultRouteTableAssociation bool

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.

TransitGatewayDefaultRouteTablePropagation bool

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.

subnetIds string[]

Identifiers of EC2 Subnets.

transitGatewayId string

Identifier of EC2 Transit Gateway.

vpcId string

Identifier of EC2 VPC.

dnsSupport string

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

ipv6Support string

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

tags {[key: string]: string}

Key-value tags for the EC2 Transit Gateway VPC Attachment.

transitGatewayDefaultRouteTableAssociation boolean

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.

transitGatewayDefaultRouteTablePropagation boolean

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.

subnet_ids List[str]

Identifiers of EC2 Subnets.

transit_gateway_id str

Identifier of EC2 Transit Gateway.

vpc_id str

Identifier of EC2 VPC.

dns_support str

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

ipv6_support str

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

tags Dict[str, str]

Key-value tags for the EC2 Transit Gateway VPC Attachment.

transit_gateway_default_route_table_association bool

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.

transit_gateway_default_route_table_propagation bool

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.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
VpcOwnerId string

Identifier of the AWS account that owns the EC2 VPC.

Id string
The provider-assigned unique ID for this managed resource.
VpcOwnerId string

Identifier of the AWS account that owns the EC2 VPC.

id string
The provider-assigned unique ID for this managed resource.
vpcOwnerId string

Identifier of the AWS account that owns the EC2 VPC.

id str
The provider-assigned unique ID for this managed resource.
vpc_owner_id str

Identifier of the AWS account that owns the EC2 VPC.

Look up an Existing VpcAttachment Resource

Get an existing VpcAttachment 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?: VpcAttachmentState, opts?: CustomResourceOptions): VpcAttachment
static get(resource_name, id, opts=None, dns_support=None, ipv6_support=None, subnet_ids=None, tags=None, transit_gateway_default_route_table_association=None, transit_gateway_default_route_table_propagation=None, transit_gateway_id=None, vpc_id=None, vpc_owner_id=None, __props__=None);
func GetVpcAttachment(ctx *Context, name string, id IDInput, state *VpcAttachmentState, opts ...ResourceOption) (*VpcAttachment, error)
public static VpcAttachment Get(string name, Input<string> id, VpcAttachmentState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

DnsSupport string

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

Ipv6Support string

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

SubnetIds List<string>

Identifiers of EC2 Subnets.

Tags Dictionary<string, string>

Key-value tags for the EC2 Transit Gateway VPC Attachment.

TransitGatewayDefaultRouteTableAssociation bool

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.

TransitGatewayDefaultRouteTablePropagation bool

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.

TransitGatewayId string

Identifier of EC2 Transit Gateway.

VpcId string

Identifier of EC2 VPC.

VpcOwnerId string

Identifier of the AWS account that owns the EC2 VPC.

DnsSupport string

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

Ipv6Support string

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

SubnetIds []string

Identifiers of EC2 Subnets.

Tags map[string]string

Key-value tags for the EC2 Transit Gateway VPC Attachment.

TransitGatewayDefaultRouteTableAssociation bool

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.

TransitGatewayDefaultRouteTablePropagation bool

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.

TransitGatewayId string

Identifier of EC2 Transit Gateway.

VpcId string

Identifier of EC2 VPC.

VpcOwnerId string

Identifier of the AWS account that owns the EC2 VPC.

dnsSupport string

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

ipv6Support string

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

subnetIds string[]

Identifiers of EC2 Subnets.

tags {[key: string]: string}

Key-value tags for the EC2 Transit Gateway VPC Attachment.

transitGatewayDefaultRouteTableAssociation boolean

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.

transitGatewayDefaultRouteTablePropagation boolean

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.

transitGatewayId string

Identifier of EC2 Transit Gateway.

vpcId string

Identifier of EC2 VPC.

vpcOwnerId string

Identifier of the AWS account that owns the EC2 VPC.

dns_support str

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

ipv6_support str

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

subnet_ids List[str]

Identifiers of EC2 Subnets.

tags Dict[str, str]

Key-value tags for the EC2 Transit Gateway VPC Attachment.

transit_gateway_default_route_table_association bool

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.

transit_gateway_default_route_table_propagation bool

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.

transit_gateway_id str

Identifier of EC2 Transit Gateway.

vpc_id str

Identifier of EC2 VPC.

vpc_owner_id str

Identifier of the AWS account that owns the EC2 VPC.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.