Show / Hide Table of Contents

Class DefaultRouteTable

Provides a resource to manage a Default VPC Routing Table.

Each VPC created in AWS comes with a Default Route Table that can be managed, but not destroyed. This is an advanced resource, and has special caveats to be aware of when using it. Please read this document in its entirety before using this resource. It is recommended you do not use both aws.ec2.DefaultRouteTable to manage the default route table and use the aws.ec2.MainRouteTableAssociation, due to possible conflict in routes.

The aws.ec2.DefaultRouteTable behaves differently from normal resources, in that this provider does not create this resource, but instead attempts to "adopt" it into management. We can do this because each VPC created has a Default Route Table that cannot be destroyed, and is created with a single route.

When this provider first adopts the Default Route Table, it immediately removes all defined routes. It then proceeds to create any routes specified in the configuration. This step is required so that only the routes specified in the configuration present in the Default Route Table.

For more information about Route Tables, see the AWS Documentation on [Route Tables][aws-route-tables].

For more information about managing normal Route Tables in this provider, see our documentation on [aws.ec2.RouteTable][tf-route-tables].

NOTE on Route Tables and Routes: This provider currently provides both a standalone Route resource and a Route Table resource with routes defined in-line. At this time you cannot use a Route Table with in-line routes in conjunction with any Route resources. Doing so will cause a conflict of rule settings and will overwrite routes.

Example usage with tags

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var defaultRouteTable = new Aws.Ec2.DefaultRouteTable("defaultRouteTable", new Aws.Ec2.DefaultRouteTableArgs
    {
        DefaultRouteTableId = aws_vpc.Foo.Default_route_table_id,
        Routes = 
        {
            ,
        },
        Tags = 
        {
            { "Name", "default table" },
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
DefaultRouteTable
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 DefaultRouteTable : CustomResource

Constructors

View Source

DefaultRouteTable(String, DefaultRouteTableArgs, CustomResourceOptions)

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

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

The unique name of the resource

DefaultRouteTableArgs 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

DefaultRouteTableId

The ID of the Default Routing Table.

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

OwnerId

The ID of the AWS account that owns the route table

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

PropagatingVgws

A list of virtual gateways for propagation.

Declaration
public Output<ImmutableArray<string>> PropagatingVgws { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Routes

A list of route objects. Their keys are documented below.

Declaration
public Output<ImmutableArray<DefaultRouteTableRoute>> Routes { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<DefaultRouteTableRoute>>
View Source

Tags

A mapping of tags to assign to the resource.

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

VpcId

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

Methods

View Source

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

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

Declaration
public static DefaultRouteTable Get(string name, Input<string> id, DefaultRouteTableState 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.

DefaultRouteTableState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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