AWS Classic v5.41.0, May 15 23
AWS Classic v5.41.0, May 15 23
aws.ec2transitgateway.Connect
Explore with Pulumi AI
Manages an EC2 Transit Gateway Connect.
Example Usage
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[]
{
aws_subnet.Example.Id,
},
TransitGatewayId = aws_ec2_transit_gateway.Example.Id,
VpcId = aws_vpc.Example.Id,
});
var attachment = new Aws.Ec2TransitGateway.Connect("attachment", new()
{
TransportAttachmentId = example.Id,
TransitGatewayId = aws_ec2_transit_gateway.Example.Id,
});
});
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 {
example, err := ec2transitgateway.NewVpcAttachment(ctx, "example", &ec2transitgateway.VpcAttachmentArgs{
SubnetIds: pulumi.StringArray{
aws_subnet.Example.Id,
},
TransitGatewayId: pulumi.Any(aws_ec2_transit_gateway.Example.Id),
VpcId: pulumi.Any(aws_vpc.Example.Id),
})
if err != nil {
return err
}
_, err = ec2transitgateway.NewConnect(ctx, "attachment", &ec2transitgateway.ConnectArgs{
TransportAttachmentId: example.ID(),
TransitGatewayId: pulumi.Any(aws_ec2_transit_gateway.Example.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 com.pulumi.aws.ec2transitgateway.Connect;
import com.pulumi.aws.ec2transitgateway.ConnectArgs;
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(aws_subnet.example().id())
.transitGatewayId(aws_ec2_transit_gateway.example().id())
.vpcId(aws_vpc.example().id())
.build());
var attachment = new Connect("attachment", ConnectArgs.builder()
.transportAttachmentId(example.id())
.transitGatewayId(aws_ec2_transit_gateway.example().id())
.build());
}
}
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"])
attachment = aws.ec2transitgateway.Connect("attachment",
transport_attachment_id=example.id,
transit_gateway_id=aws_ec2_transit_gateway["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,
});
const attachment = new aws.ec2transitgateway.Connect("attachment", {
transportAttachmentId: example.id,
transitGatewayId: aws_ec2_transit_gateway.example.id,
});
resources:
example:
type: aws:ec2transitgateway:VpcAttachment
properties:
subnetIds:
- ${aws_subnet.example.id}
transitGatewayId: ${aws_ec2_transit_gateway.example.id}
vpcId: ${aws_vpc.example.id}
attachment:
type: aws:ec2transitgateway:Connect
properties:
transportAttachmentId: ${example.id}
transitGatewayId: ${aws_ec2_transit_gateway.example.id}
Create Connect Resource
new Connect(name: string, args: ConnectArgs, opts?: CustomResourceOptions);
@overload
def Connect(resource_name: str,
opts: Optional[ResourceOptions] = None,
protocol: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
transit_gateway_default_route_table_association: Optional[bool] = None,
transit_gateway_default_route_table_propagation: Optional[bool] = None,
transit_gateway_id: Optional[str] = None,
transport_attachment_id: Optional[str] = None)
@overload
def Connect(resource_name: str,
args: ConnectArgs,
opts: Optional[ResourceOptions] = None)
func NewConnect(ctx *Context, name string, args ConnectArgs, opts ...ResourceOption) (*Connect, error)
public Connect(string name, ConnectArgs args, CustomResourceOptions? opts = null)
public Connect(String name, ConnectArgs args)
public Connect(String name, ConnectArgs args, CustomResourceOptions options)
type: aws:ec2transitgateway:Connect
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConnectArgs
- 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 ConnectArgs
- 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 ConnectArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConnectArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ConnectArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Connect 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 Connect resource accepts the following input properties:
- Transit
Gateway stringId Identifier of EC2 Transit Gateway.
- Transport
Attachment stringId The underlaying VPC attachment
- Protocol string
The tunnel protocol. Valida values:
gre
. Default isgre
.- Dictionary<string, string>
Key-value tags for the EC2 Transit Gateway Connect. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Transit
Gateway boolDefault Route Table Association Boolean whether the Connect 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 boolDefault Route Table Propagation Boolean whether the Connect 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 stringId Identifier of EC2 Transit Gateway.
- Transport
Attachment stringId The underlaying VPC attachment
- Protocol string
The tunnel protocol. Valida values:
gre
. Default isgre
.- map[string]string
Key-value tags for the EC2 Transit Gateway Connect. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Transit
Gateway boolDefault Route Table Association Boolean whether the Connect 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 boolDefault Route Table Propagation Boolean whether the Connect 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 StringId Identifier of EC2 Transit Gateway.
- transport
Attachment StringId The underlaying VPC attachment
- protocol String
The tunnel protocol. Valida values:
gre
. Default isgre
.- Map<String,String>
Key-value tags for the EC2 Transit Gateway Connect. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- transit
Gateway BooleanDefault Route Table Association Boolean whether the Connect 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 BooleanDefault Route Table Propagation Boolean whether the Connect 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 stringId Identifier of EC2 Transit Gateway.
- transport
Attachment stringId The underlaying VPC attachment
- protocol string
The tunnel protocol. Valida values:
gre
. Default isgre
.- {[key: string]: string}
Key-value tags for the EC2 Transit Gateway Connect. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- transit
Gateway booleanDefault Route Table Association Boolean whether the Connect 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 booleanDefault Route Table Propagation Boolean whether the Connect 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_ strid Identifier of EC2 Transit Gateway.
- transport_
attachment_ strid The underlaying VPC attachment
- protocol str
The tunnel protocol. Valida values:
gre
. Default isgre
.- Mapping[str, str]
Key-value tags for the EC2 Transit Gateway Connect. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- transit_
gateway_ booldefault_ route_ table_ association Boolean whether the Connect 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_ booldefault_ route_ table_ propagation Boolean whether the Connect 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 StringId Identifier of EC2 Transit Gateway.
- transport
Attachment StringId The underlaying VPC attachment
- protocol String
The tunnel protocol. Valida values:
gre
. Default isgre
.- Map<String>
Key-value tags for the EC2 Transit Gateway Connect. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- transit
Gateway BooleanDefault Route Table Association Boolean whether the Connect 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 BooleanDefault Route Table Propagation Boolean whether the Connect 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 Connect resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Id string
The provider-assigned unique ID for this managed resource.
- map[string]string
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id String
The provider-assigned unique ID for this managed resource.
- Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id string
The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id str
The provider-assigned unique ID for this managed resource.
- Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id String
The provider-assigned unique ID for this managed resource.
- Map<String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Look up Existing Connect Resource
Get an existing Connect 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?: ConnectState, opts?: CustomResourceOptions): Connect
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
protocol: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
transit_gateway_default_route_table_association: Optional[bool] = None,
transit_gateway_default_route_table_propagation: Optional[bool] = None,
transit_gateway_id: Optional[str] = None,
transport_attachment_id: Optional[str] = None) -> Connect
func GetConnect(ctx *Context, name string, id IDInput, state *ConnectState, opts ...ResourceOption) (*Connect, error)
public static Connect Get(string name, Input<string> id, ConnectState? state, CustomResourceOptions? opts = null)
public static Connect get(String name, Output<String> id, ConnectState 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.
- Protocol string
The tunnel protocol. Valida values:
gre
. Default isgre
.- Dictionary<string, string>
Key-value tags for the EC2 Transit Gateway Connect. 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 boolDefault Route Table Association Boolean whether the Connect 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 boolDefault Route Table Propagation Boolean whether the Connect 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 stringId Identifier of EC2 Transit Gateway.
- Transport
Attachment stringId The underlaying VPC attachment
- Protocol string
The tunnel protocol. Valida values:
gre
. Default isgre
.- map[string]string
Key-value tags for the EC2 Transit Gateway Connect. 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 boolDefault Route Table Association Boolean whether the Connect 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 boolDefault Route Table Propagation Boolean whether the Connect 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 stringId Identifier of EC2 Transit Gateway.
- Transport
Attachment stringId The underlaying VPC attachment
- protocol String
The tunnel protocol. Valida values:
gre
. Default isgre
.- Map<String,String>
Key-value tags for the EC2 Transit Gateway Connect. 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 BooleanDefault Route Table Association Boolean whether the Connect 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 BooleanDefault Route Table Propagation Boolean whether the Connect 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 StringId Identifier of EC2 Transit Gateway.
- transport
Attachment StringId The underlaying VPC attachment
- protocol string
The tunnel protocol. Valida values:
gre
. Default isgre
.- {[key: string]: string}
Key-value tags for the EC2 Transit Gateway Connect. 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 booleanDefault Route Table Association Boolean whether the Connect 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 booleanDefault Route Table Propagation Boolean whether the Connect 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 stringId Identifier of EC2 Transit Gateway.
- transport
Attachment stringId The underlaying VPC attachment
- protocol str
The tunnel protocol. Valida values:
gre
. Default isgre
.- Mapping[str, str]
Key-value tags for the EC2 Transit Gateway Connect. 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_ booldefault_ route_ table_ association Boolean whether the Connect 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_ booldefault_ route_ table_ propagation Boolean whether the Connect 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_ strid Identifier of EC2 Transit Gateway.
- transport_
attachment_ strid The underlaying VPC attachment
- protocol String
The tunnel protocol. Valida values:
gre
. Default isgre
.- Map<String>
Key-value tags for the EC2 Transit Gateway Connect. 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 BooleanDefault Route Table Association Boolean whether the Connect 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 BooleanDefault Route Table Propagation Boolean whether the Connect 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 StringId Identifier of EC2 Transit Gateway.
- transport
Attachment StringId The underlaying VPC attachment
Import
aws_ec2_transit_gateway_connect
can be imported by using the EC2 Transit Gateway Connect identifier, e.g.,
$ pulumi import aws:ec2transitgateway/connect:Connect example tgw-attach-12345678
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.