Show / Hide Table of Contents

Class MainRouteTableAssociation

Provides a resource for managing the main routing table of a VPC.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var mainRouteTableAssociation = new Aws.Ec2.MainRouteTableAssociation("mainRouteTableAssociation", new Aws.Ec2.MainRouteTableAssociationArgs
    {
        RouteTableId = aws_route_table.Bar.Id,
        VpcId = aws_vpc.Foo.Id,
    });
}

}

Notes

On VPC creation, the AWS API always creates an initial Main Route Table. This resource records the ID of that Route Table under original_route_table_id. The "Delete" action for a main_route_table_association consists of resetting this original table as the Main Route Table for the VPC. You'll see this additional Route Table in the AWS console; it must remain intact in order for the main_route_table_association delete to work properly.

Inheritance
System.Object
Resource
CustomResource
MainRouteTableAssociation
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class MainRouteTableAssociation : CustomResource

Constructors

View Source

MainRouteTableAssociation(String, MainRouteTableAssociationArgs, CustomResourceOptions)

Create a MainRouteTableAssociation resource with the given unique name, arguments, and options.

Declaration
public MainRouteTableAssociation(string name, MainRouteTableAssociationArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

MainRouteTableAssociationArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

OriginalRouteTableId

Used internally, see Notes below

Declaration
public Output<string> OriginalRouteTableId { get; }
Property Value
Type Description
Output<System.String>
View Source

RouteTableId

The ID of the Route Table to set as the new main route table for the target VPC

Declaration
public Output<string> RouteTableId { get; }
Property Value
Type Description
Output<System.String>
View Source

VpcId

The ID of the VPC whose main route table should be set

Declaration
public Output<string> VpcId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, MainRouteTableAssociationState, CustomResourceOptions)

Get an existing MainRouteTableAssociation resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static MainRouteTableAssociation Get(string name, Input<string> id, MainRouteTableAssociationState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

MainRouteTableAssociationState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
MainRouteTableAssociation
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.