RouteTableAssociation
Manages an EC2 Transit Gateway Route Table association.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Ec2TransitGateway.RouteTableAssociation("example", new Aws.Ec2TransitGateway.RouteTableAssociationArgs
{
TransitGatewayAttachmentId = aws_ec2_transit_gateway_vpc_attachment.Example.Id,
TransitGatewayRouteTableId = aws_ec2_transit_gateway_route_table.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.NewRouteTableAssociation(ctx, "example", &ec2transitgateway.RouteTableAssociationArgs{
TransitGatewayAttachmentId: pulumi.String(aws_ec2_transit_gateway_vpc_attachment.Example.Id),
TransitGatewayRouteTableId: pulumi.String(aws_ec2_transit_gateway_route_table.Example.Id),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.RouteTableAssociation("example",
transit_gateway_attachment_id=aws_ec2_transit_gateway_vpc_attachment["example"]["id"],
transit_gateway_route_table_id=aws_ec2_transit_gateway_route_table["example"]["id"])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2transitgateway.RouteTableAssociation("example", {
transitGatewayAttachmentId: aws_ec2_transit_gateway_vpc_attachment_example.id,
transitGatewayRouteTableId: aws_ec2_transit_gateway_route_table_example.id,
});Create a RouteTableAssociation Resource
new RouteTableAssociation(name: string, args: RouteTableAssociationArgs, opts?: CustomResourceOptions);def RouteTableAssociation(resource_name, opts=None, transit_gateway_attachment_id=None, transit_gateway_route_table_id=None, __props__=None);func NewRouteTableAssociation(ctx *Context, name string, args RouteTableAssociationArgs, opts ...ResourceOption) (*RouteTableAssociation, error)public RouteTableAssociation(string name, RouteTableAssociationArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args RouteTableAssociationArgs
- 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 RouteTableAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RouteTableAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
RouteTableAssociation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The RouteTableAssociation resource accepts the following input properties:
- Transit
Gateway stringAttachment Id Identifier of EC2 Transit Gateway Attachment.
- Transit
Gateway stringRoute Table Id Identifier of EC2 Transit Gateway Route Table.
- Transit
Gateway stringAttachment Id Identifier of EC2 Transit Gateway Attachment.
- Transit
Gateway stringRoute Table Id Identifier of EC2 Transit Gateway Route Table.
- transit
Gateway stringAttachment Id Identifier of EC2 Transit Gateway Attachment.
- transit
Gateway stringRoute Table Id Identifier of EC2 Transit Gateway Route Table.
- transit_
gateway_ strattachment_ id Identifier of EC2 Transit Gateway Attachment.
- transit_
gateway_ strroute_ table_ id Identifier of EC2 Transit Gateway Route Table.
Outputs
All input properties are implicitly available as output properties. Additionally, the RouteTableAssociation resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Resource
Id string Identifier of the resource
- Resource
Type string Type of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- Resource
Id string Identifier of the resource
- Resource
Type string Type of the resource
- id string
- The provider-assigned unique ID for this managed resource.
- resource
Id string Identifier of the resource
- resource
Type string Type of the resource
- id str
- The provider-assigned unique ID for this managed resource.
- resource_
id str Identifier of the resource
- resource_
type str Type of the resource
Look up an Existing RouteTableAssociation Resource
Get an existing RouteTableAssociation 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?: RouteTableAssociationState, opts?: CustomResourceOptions): RouteTableAssociationstatic get(resource_name, id, opts=None, resource_id=None, resource_type=None, transit_gateway_attachment_id=None, transit_gateway_route_table_id=None, __props__=None);func GetRouteTableAssociation(ctx *Context, name string, id IDInput, state *RouteTableAssociationState, opts ...ResourceOption) (*RouteTableAssociation, error)public static RouteTableAssociation Get(string name, Input<string> id, RouteTableAssociationState? 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:
- Resource
Id string Identifier of the resource
- Resource
Type string Type of the resource
- Transit
Gateway stringAttachment Id Identifier of EC2 Transit Gateway Attachment.
- Transit
Gateway stringRoute Table Id Identifier of EC2 Transit Gateway Route Table.
- Resource
Id string Identifier of the resource
- Resource
Type string Type of the resource
- Transit
Gateway stringAttachment Id Identifier of EC2 Transit Gateway Attachment.
- Transit
Gateway stringRoute Table Id Identifier of EC2 Transit Gateway Route Table.
- resource
Id string Identifier of the resource
- resource
Type string Type of the resource
- transit
Gateway stringAttachment Id Identifier of EC2 Transit Gateway Attachment.
- transit
Gateway stringRoute Table Id Identifier of EC2 Transit Gateway Route Table.
- resource_
id str Identifier of the resource
- resource_
type str Type of the resource
- transit_
gateway_ strattachment_ id Identifier of EC2 Transit Gateway Attachment.
- transit_
gateway_ strroute_ table_ id Identifier of EC2 Transit Gateway Route Table.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.