Transit Gateway Route Table Attachment Args
data class TransitGatewayRouteTableAttachmentArgs(val peeringId: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val transitGatewayRouteTableArn: Output<String>? = null) : ConvertibleToJava<TransitGatewayRouteTableAttachmentArgs>
Creates a transit gateway route table attachment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.networkmanager.TransitGatewayRouteTableAttachment("example", {
peeringId: exampleAwsNetworkmanagerTransitGatewayPeering.id,
transitGatewayRouteTableArn: exampleAwsEc2TransitGatewayRouteTable.arn,
});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
example = aws.networkmanager.TransitGatewayRouteTableAttachment("example",
peering_id=example_aws_networkmanager_transit_gateway_peering["id"],
transit_gateway_route_table_arn=example_aws_ec2_transit_gateway_route_table["arn"])
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.NetworkManager.TransitGatewayRouteTableAttachment("example", new()
{
PeeringId = exampleAwsNetworkmanagerTransitGatewayPeering.Id,
TransitGatewayRouteTableArn = exampleAwsEc2TransitGatewayRouteTable.Arn,
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkmanager.NewTransitGatewayRouteTableAttachment(ctx, "example", &networkmanager.TransitGatewayRouteTableAttachmentArgs{
PeeringId: pulumi.Any(exampleAwsNetworkmanagerTransitGatewayPeering.Id),
TransitGatewayRouteTableArn: pulumi.Any(exampleAwsEc2TransitGatewayRouteTable.Arn),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkmanager.TransitGatewayRouteTableAttachment;
import com.pulumi.aws.networkmanager.TransitGatewayRouteTableAttachmentArgs;
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 TransitGatewayRouteTableAttachment("example", TransitGatewayRouteTableAttachmentArgs.builder()
.peeringId(exampleAwsNetworkmanagerTransitGatewayPeering.id())
.transitGatewayRouteTableArn(exampleAwsEc2TransitGatewayRouteTable.arn())
.build());
}
}
Content copied to clipboard
resources:
example:
type: aws:networkmanager:TransitGatewayRouteTableAttachment
properties:
peeringId: ${exampleAwsNetworkmanagerTransitGatewayPeering.id}
transitGatewayRouteTableArn: ${exampleAwsEc2TransitGatewayRouteTable.arn}
Content copied to clipboard
Import
Using pulumi import
, import aws_networkmanager_transit_gateway_route_table_attachment
using the attachment ID. For example:
$ pulumi import aws:networkmanager/transitGatewayRouteTableAttachment:TransitGatewayRouteTableAttachment example attachment-0f8fa60d2238d1bd8
Content copied to clipboard