aws.ec2.DefaultRouteTable
Explore with Pulumi AI
Provides a resource to manage a default route table of a VPC. This resource can manage the default route table of the default or a non-default VPC.
NOTE: This is an advanced resource with special caveats. Please read this document in its entirety before using this resource. The
aws.ec2.DefaultRouteTableresource behaves differently from normal resources. This provider does not create this resource but instead attempts to “adopt” it into management. Do not use bothaws.ec2.DefaultRouteTableto manage a default route table andaws.ec2.MainRouteTableAssociationwith the same VPC due to possible route conflicts. See aws.ec2.MainRouteTableAssociation documentation for more details.
Every VPC has a default route table that can be managed but not destroyed. When the provider first adopts a 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 exist in the default route table.
For more information, see the Amazon VPC User Guide on Route Tables. For information about managing normal route tables in this provider, see aws.ec2.RouteTable.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2.DefaultRouteTable("example", {
    defaultRouteTableId: exampleAwsVpc.defaultRouteTableId,
    routes: [
        {
            cidrBlock: "10.0.1.0/24",
            gatewayId: exampleAwsInternetGateway.id,
        },
        {
            ipv6CidrBlock: "::/0",
            egressOnlyGatewayId: exampleAwsEgressOnlyInternetGateway.id,
        },
    ],
    tags: {
        Name: "example",
    },
});
import pulumi
import pulumi_aws as aws
example = aws.ec2.DefaultRouteTable("example",
    default_route_table_id=example_aws_vpc["defaultRouteTableId"],
    routes=[
        {
            "cidr_block": "10.0.1.0/24",
            "gateway_id": example_aws_internet_gateway["id"],
        },
        {
            "ipv6_cidr_block": "::/0",
            "egress_only_gateway_id": example_aws_egress_only_internet_gateway["id"],
        },
    ],
    tags={
        "Name": "example",
    })
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.NewDefaultRouteTable(ctx, "example", &ec2.DefaultRouteTableArgs{
			DefaultRouteTableId: pulumi.Any(exampleAwsVpc.DefaultRouteTableId),
			Routes: ec2.DefaultRouteTableRouteArray{
				&ec2.DefaultRouteTableRouteArgs{
					CidrBlock: pulumi.String("10.0.1.0/24"),
					GatewayId: pulumi.Any(exampleAwsInternetGateway.Id),
				},
				&ec2.DefaultRouteTableRouteArgs{
					Ipv6CidrBlock:       pulumi.String("::/0"),
					EgressOnlyGatewayId: pulumi.Any(exampleAwsEgressOnlyInternetGateway.Id),
				},
			},
			Tags: pulumi.StringMap{
				"Name": pulumi.String("example"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = new Aws.Ec2.DefaultRouteTable("example", new()
    {
        DefaultRouteTableId = exampleAwsVpc.DefaultRouteTableId,
        Routes = new[]
        {
            new Aws.Ec2.Inputs.DefaultRouteTableRouteArgs
            {
                CidrBlock = "10.0.1.0/24",
                GatewayId = exampleAwsInternetGateway.Id,
            },
            new Aws.Ec2.Inputs.DefaultRouteTableRouteArgs
            {
                Ipv6CidrBlock = "::/0",
                EgressOnlyGatewayId = exampleAwsEgressOnlyInternetGateway.Id,
            },
        },
        Tags = 
        {
            { "Name", "example" },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.DefaultRouteTable;
import com.pulumi.aws.ec2.DefaultRouteTableArgs;
import com.pulumi.aws.ec2.inputs.DefaultRouteTableRouteArgs;
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 DefaultRouteTable("example", DefaultRouteTableArgs.builder()
            .defaultRouteTableId(exampleAwsVpc.defaultRouteTableId())
            .routes(            
                DefaultRouteTableRouteArgs.builder()
                    .cidrBlock("10.0.1.0/24")
                    .gatewayId(exampleAwsInternetGateway.id())
                    .build(),
                DefaultRouteTableRouteArgs.builder()
                    .ipv6CidrBlock("::/0")
                    .egressOnlyGatewayId(exampleAwsEgressOnlyInternetGateway.id())
                    .build())
            .tags(Map.of("Name", "example"))
            .build());
    }
}
resources:
  example:
    type: aws:ec2:DefaultRouteTable
    properties:
      defaultRouteTableId: ${exampleAwsVpc.defaultRouteTableId}
      routes:
        - cidrBlock: 10.0.1.0/24
          gatewayId: ${exampleAwsInternetGateway.id}
        - ipv6CidrBlock: ::/0
          egressOnlyGatewayId: ${exampleAwsEgressOnlyInternetGateway.id}
      tags:
        Name: example
To subsequently remove all managed routes:
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2.DefaultRouteTable("example", {
    defaultRouteTableId: exampleAwsVpc.defaultRouteTableId,
    routes: [],
    tags: {
        Name: "example",
    },
});
import pulumi
import pulumi_aws as aws
example = aws.ec2.DefaultRouteTable("example",
    default_route_table_id=example_aws_vpc["defaultRouteTableId"],
    routes=[],
    tags={
        "Name": "example",
    })
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.NewDefaultRouteTable(ctx, "example", &ec2.DefaultRouteTableArgs{
			DefaultRouteTableId: pulumi.Any(exampleAwsVpc.DefaultRouteTableId),
			Routes:              ec2.DefaultRouteTableRouteArray{},
			Tags: pulumi.StringMap{
				"Name": pulumi.String("example"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = new Aws.Ec2.DefaultRouteTable("example", new()
    {
        DefaultRouteTableId = exampleAwsVpc.DefaultRouteTableId,
        Routes = new[] {},
        Tags = 
        {
            { "Name", "example" },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.DefaultRouteTable;
import com.pulumi.aws.ec2.DefaultRouteTableArgs;
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 DefaultRouteTable("example", DefaultRouteTableArgs.builder()
            .defaultRouteTableId(exampleAwsVpc.defaultRouteTableId())
            .routes()
            .tags(Map.of("Name", "example"))
            .build());
    }
}
resources:
  example:
    type: aws:ec2:DefaultRouteTable
    properties:
      defaultRouteTableId: ${exampleAwsVpc.defaultRouteTableId}
      routes: []
      tags:
        Name: example
Create DefaultRouteTable Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DefaultRouteTable(name: string, args: DefaultRouteTableArgs, opts?: CustomResourceOptions);@overload
def DefaultRouteTable(resource_name: str,
                      args: DefaultRouteTableArgs,
                      opts: Optional[ResourceOptions] = None)
@overload
def DefaultRouteTable(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      default_route_table_id: Optional[str] = None,
                      propagating_vgws: Optional[Sequence[str]] = None,
                      routes: Optional[Sequence[DefaultRouteTableRouteArgs]] = None,
                      tags: Optional[Mapping[str, str]] = None)func NewDefaultRouteTable(ctx *Context, name string, args DefaultRouteTableArgs, opts ...ResourceOption) (*DefaultRouteTable, error)public DefaultRouteTable(string name, DefaultRouteTableArgs args, CustomResourceOptions? opts = null)
public DefaultRouteTable(String name, DefaultRouteTableArgs args)
public DefaultRouteTable(String name, DefaultRouteTableArgs args, CustomResourceOptions options)
type: aws:ec2:DefaultRouteTable
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DefaultRouteTableArgs
- 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 DefaultRouteTableArgs
- 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 DefaultRouteTableArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DefaultRouteTableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DefaultRouteTableArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var defaultRouteTableResource = new Aws.Ec2.DefaultRouteTable("defaultRouteTableResource", new()
{
    DefaultRouteTableId = "string",
    PropagatingVgws = new[]
    {
        "string",
    },
    Routes = new[]
    {
        new Aws.Ec2.Inputs.DefaultRouteTableRouteArgs
        {
            CidrBlock = "string",
            CoreNetworkArn = "string",
            DestinationPrefixListId = "string",
            EgressOnlyGatewayId = "string",
            GatewayId = "string",
            InstanceId = "string",
            Ipv6CidrBlock = "string",
            NatGatewayId = "string",
            NetworkInterfaceId = "string",
            TransitGatewayId = "string",
            VpcEndpointId = "string",
            VpcPeeringConnectionId = "string",
        },
    },
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := ec2.NewDefaultRouteTable(ctx, "defaultRouteTableResource", &ec2.DefaultRouteTableArgs{
	DefaultRouteTableId: pulumi.String("string"),
	PropagatingVgws: pulumi.StringArray{
		pulumi.String("string"),
	},
	Routes: ec2.DefaultRouteTableRouteArray{
		&ec2.DefaultRouteTableRouteArgs{
			CidrBlock:               pulumi.String("string"),
			CoreNetworkArn:          pulumi.String("string"),
			DestinationPrefixListId: pulumi.String("string"),
			EgressOnlyGatewayId:     pulumi.String("string"),
			GatewayId:               pulumi.String("string"),
			InstanceId:              pulumi.String("string"),
			Ipv6CidrBlock:           pulumi.String("string"),
			NatGatewayId:            pulumi.String("string"),
			NetworkInterfaceId:      pulumi.String("string"),
			TransitGatewayId:        pulumi.String("string"),
			VpcEndpointId:           pulumi.String("string"),
			VpcPeeringConnectionId:  pulumi.String("string"),
		},
	},
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var defaultRouteTableResource = new DefaultRouteTable("defaultRouteTableResource", DefaultRouteTableArgs.builder()
    .defaultRouteTableId("string")
    .propagatingVgws("string")
    .routes(DefaultRouteTableRouteArgs.builder()
        .cidrBlock("string")
        .coreNetworkArn("string")
        .destinationPrefixListId("string")
        .egressOnlyGatewayId("string")
        .gatewayId("string")
        .instanceId("string")
        .ipv6CidrBlock("string")
        .natGatewayId("string")
        .networkInterfaceId("string")
        .transitGatewayId("string")
        .vpcEndpointId("string")
        .vpcPeeringConnectionId("string")
        .build())
    .tags(Map.of("string", "string"))
    .build());
default_route_table_resource = aws.ec2.DefaultRouteTable("defaultRouteTableResource",
    default_route_table_id="string",
    propagating_vgws=["string"],
    routes=[{
        "cidr_block": "string",
        "core_network_arn": "string",
        "destination_prefix_list_id": "string",
        "egress_only_gateway_id": "string",
        "gateway_id": "string",
        "instance_id": "string",
        "ipv6_cidr_block": "string",
        "nat_gateway_id": "string",
        "network_interface_id": "string",
        "transit_gateway_id": "string",
        "vpc_endpoint_id": "string",
        "vpc_peering_connection_id": "string",
    }],
    tags={
        "string": "string",
    })
const defaultRouteTableResource = new aws.ec2.DefaultRouteTable("defaultRouteTableResource", {
    defaultRouteTableId: "string",
    propagatingVgws: ["string"],
    routes: [{
        cidrBlock: "string",
        coreNetworkArn: "string",
        destinationPrefixListId: "string",
        egressOnlyGatewayId: "string",
        gatewayId: "string",
        instanceId: "string",
        ipv6CidrBlock: "string",
        natGatewayId: "string",
        networkInterfaceId: "string",
        transitGatewayId: "string",
        vpcEndpointId: "string",
        vpcPeeringConnectionId: "string",
    }],
    tags: {
        string: "string",
    },
});
type: aws:ec2:DefaultRouteTable
properties:
    defaultRouteTableId: string
    propagatingVgws:
        - string
    routes:
        - cidrBlock: string
          coreNetworkArn: string
          destinationPrefixListId: string
          egressOnlyGatewayId: string
          gatewayId: string
          instanceId: string
          ipv6CidrBlock: string
          natGatewayId: string
          networkInterfaceId: string
          transitGatewayId: string
          vpcEndpointId: string
          vpcPeeringConnectionId: string
    tags:
        string: string
DefaultRouteTable Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DefaultRouteTable resource accepts the following input properties:
- DefaultRoute stringTable Id 
- ID of the default route table. - The following arguments are optional: 
- PropagatingVgws List<string>
- List of virtual gateways for propagation.
- Routes
List<DefaultRoute Table Route> 
- Set of objects. Detailed below
- Dictionary<string, string>
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- DefaultRoute stringTable Id 
- ID of the default route table. - The following arguments are optional: 
- PropagatingVgws []string
- List of virtual gateways for propagation.
- Routes
[]DefaultRoute Table Route Args 
- Set of objects. Detailed below
- map[string]string
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- defaultRoute StringTable Id 
- ID of the default route table. - The following arguments are optional: 
- propagatingVgws List<String>
- List of virtual gateways for propagation.
- routes
List<DefaultRoute Table Route> 
- Set of objects. Detailed below
- Map<String,String>
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- defaultRoute stringTable Id 
- ID of the default route table. - The following arguments are optional: 
- propagatingVgws string[]
- List of virtual gateways for propagation.
- routes
DefaultRoute Table Route[] 
- Set of objects. Detailed below
- {[key: string]: string}
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- default_route_ strtable_ id 
- ID of the default route table. - The following arguments are optional: 
- propagating_vgws Sequence[str]
- List of virtual gateways for propagation.
- routes
Sequence[DefaultRoute Table Route Args] 
- Set of objects. Detailed below
- Mapping[str, str]
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- defaultRoute StringTable Id 
- ID of the default route table. - The following arguments are optional: 
- propagatingVgws List<String>
- List of virtual gateways for propagation.
- routes List<Property Map>
- Set of objects. Detailed below
- Map<String>
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
Outputs
All input properties are implicitly available as output properties. Additionally, the DefaultRouteTable resource produces the following output properties:
- Arn string
- The ARN of the route table.
- Id string
- The provider-assigned unique ID for this managed resource.
- OwnerId string
- ID of the AWS account that owns the route table.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- VpcId string
- ID of the VPC.
- Arn string
- The ARN of the route table.
- Id string
- The provider-assigned unique ID for this managed resource.
- OwnerId string
- ID of the AWS account that owns the route table.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- VpcId string
- ID of the VPC.
- arn String
- The ARN of the route table.
- id String
- The provider-assigned unique ID for this managed resource.
- ownerId String
- ID of the AWS account that owns the route table.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- vpcId String
- ID of the VPC.
- arn string
- The ARN of the route table.
- id string
- The provider-assigned unique ID for this managed resource.
- ownerId string
- ID of the AWS account that owns the route table.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- vpcId string
- ID of the VPC.
- arn str
- The ARN of the route table.
- id str
- The provider-assigned unique ID for this managed resource.
- owner_id str
- ID of the AWS account that owns the route table.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- vpc_id str
- ID of the VPC.
- arn String
- The ARN of the route table.
- id String
- The provider-assigned unique ID for this managed resource.
- ownerId String
- ID of the AWS account that owns the route table.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- vpcId String
- ID of the VPC.
Look up Existing DefaultRouteTable Resource
Get an existing DefaultRouteTable 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?: DefaultRouteTableState, opts?: CustomResourceOptions): DefaultRouteTable@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        default_route_table_id: Optional[str] = None,
        owner_id: Optional[str] = None,
        propagating_vgws: Optional[Sequence[str]] = None,
        routes: Optional[Sequence[DefaultRouteTableRouteArgs]] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        vpc_id: Optional[str] = None) -> DefaultRouteTablefunc GetDefaultRouteTable(ctx *Context, name string, id IDInput, state *DefaultRouteTableState, opts ...ResourceOption) (*DefaultRouteTable, error)public static DefaultRouteTable Get(string name, Input<string> id, DefaultRouteTableState? state, CustomResourceOptions? opts = null)public static DefaultRouteTable get(String name, Output<String> id, DefaultRouteTableState state, CustomResourceOptions options)resources:  _:    type: aws:ec2:DefaultRouteTable    get:      id: ${id}- 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.
- Arn string
- The ARN of the route table.
- DefaultRoute stringTable Id 
- ID of the default route table. - The following arguments are optional: 
- OwnerId string
- ID of the AWS account that owns the route table.
- PropagatingVgws List<string>
- List of virtual gateways for propagation.
- Routes
List<DefaultRoute Table Route> 
- Set of objects. Detailed below
- Dictionary<string, string>
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration 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_tagsconfiguration block.
- VpcId string
- ID of the VPC.
- Arn string
- The ARN of the route table.
- DefaultRoute stringTable Id 
- ID of the default route table. - The following arguments are optional: 
- OwnerId string
- ID of the AWS account that owns the route table.
- PropagatingVgws []string
- List of virtual gateways for propagation.
- Routes
[]DefaultRoute Table Route Args 
- Set of objects. Detailed below
- map[string]string
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration 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_tagsconfiguration block.
- VpcId string
- ID of the VPC.
- arn String
- The ARN of the route table.
- defaultRoute StringTable Id 
- ID of the default route table. - The following arguments are optional: 
- ownerId String
- ID of the AWS account that owns the route table.
- propagatingVgws List<String>
- List of virtual gateways for propagation.
- routes
List<DefaultRoute Table Route> 
- Set of objects. Detailed below
- Map<String,String>
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration 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_tagsconfiguration block.
- vpcId String
- ID of the VPC.
- arn string
- The ARN of the route table.
- defaultRoute stringTable Id 
- ID of the default route table. - The following arguments are optional: 
- ownerId string
- ID of the AWS account that owns the route table.
- propagatingVgws string[]
- List of virtual gateways for propagation.
- routes
DefaultRoute Table Route[] 
- Set of objects. Detailed below
- {[key: string]: string}
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration 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_tagsconfiguration block.
- vpcId string
- ID of the VPC.
- arn str
- The ARN of the route table.
- default_route_ strtable_ id 
- ID of the default route table. - The following arguments are optional: 
- owner_id str
- ID of the AWS account that owns the route table.
- propagating_vgws Sequence[str]
- List of virtual gateways for propagation.
- routes
Sequence[DefaultRoute Table Route Args] 
- Set of objects. Detailed below
- Mapping[str, str]
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration 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_tagsconfiguration block.
- vpc_id str
- ID of the VPC.
- arn String
- The ARN of the route table.
- defaultRoute StringTable Id 
- ID of the default route table. - The following arguments are optional: 
- ownerId String
- ID of the AWS account that owns the route table.
- propagatingVgws List<String>
- List of virtual gateways for propagation.
- routes List<Property Map>
- Set of objects. Detailed below
- Map<String>
- Map of tags to assign to the resource. If configured with a provider default_tagsconfiguration 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_tagsconfiguration block.
- vpcId String
- ID of the VPC.
Supporting Types
DefaultRouteTableRoute, DefaultRouteTableRouteArgs        
- CidrBlock string
- The CIDR block of the route.
- CoreNetwork stringArn 
- The Amazon Resource Name (ARN) of a core network.
- DestinationPrefix stringList Id 
- The ID of a managed prefix list destination of the route. - One of the following target arguments must be supplied: 
- EgressOnly stringGateway Id 
- Identifier of a VPC Egress Only Internet Gateway.
- GatewayId string
- Identifier of a VPC internet gateway or a virtual private gateway.
- InstanceId string
- Identifier of an EC2 instance.
- Ipv6CidrBlock string
- The Ipv6 CIDR block of the route
- NatGateway stringId 
- Identifier of a VPC NAT gateway.
- NetworkInterface stringId 
- Identifier of an EC2 network interface.
- TransitGateway stringId 
- Identifier of an EC2 Transit Gateway.
- VpcEndpoint stringId 
- Identifier of a VPC Endpoint. This route must be removed prior to VPC Endpoint deletion.
- VpcPeering stringConnection Id 
- Identifier of a VPC peering connection. - Note that the default route, mapping the VPC's CIDR block to "local", is created implicitly and cannot be specified. 
- CidrBlock string
- The CIDR block of the route.
- CoreNetwork stringArn 
- The Amazon Resource Name (ARN) of a core network.
- DestinationPrefix stringList Id 
- The ID of a managed prefix list destination of the route. - One of the following target arguments must be supplied: 
- EgressOnly stringGateway Id 
- Identifier of a VPC Egress Only Internet Gateway.
- GatewayId string
- Identifier of a VPC internet gateway or a virtual private gateway.
- InstanceId string
- Identifier of an EC2 instance.
- Ipv6CidrBlock string
- The Ipv6 CIDR block of the route
- NatGateway stringId 
- Identifier of a VPC NAT gateway.
- NetworkInterface stringId 
- Identifier of an EC2 network interface.
- TransitGateway stringId 
- Identifier of an EC2 Transit Gateway.
- VpcEndpoint stringId 
- Identifier of a VPC Endpoint. This route must be removed prior to VPC Endpoint deletion.
- VpcPeering stringConnection Id 
- Identifier of a VPC peering connection. - Note that the default route, mapping the VPC's CIDR block to "local", is created implicitly and cannot be specified. 
- cidrBlock String
- The CIDR block of the route.
- coreNetwork StringArn 
- The Amazon Resource Name (ARN) of a core network.
- destinationPrefix StringList Id 
- The ID of a managed prefix list destination of the route. - One of the following target arguments must be supplied: 
- egressOnly StringGateway Id 
- Identifier of a VPC Egress Only Internet Gateway.
- gatewayId String
- Identifier of a VPC internet gateway or a virtual private gateway.
- instanceId String
- Identifier of an EC2 instance.
- ipv6CidrBlock String
- The Ipv6 CIDR block of the route
- natGateway StringId 
- Identifier of a VPC NAT gateway.
- networkInterface StringId 
- Identifier of an EC2 network interface.
- transitGateway StringId 
- Identifier of an EC2 Transit Gateway.
- vpcEndpoint StringId 
- Identifier of a VPC Endpoint. This route must be removed prior to VPC Endpoint deletion.
- vpcPeering StringConnection Id 
- Identifier of a VPC peering connection. - Note that the default route, mapping the VPC's CIDR block to "local", is created implicitly and cannot be specified. 
- cidrBlock string
- The CIDR block of the route.
- coreNetwork stringArn 
- The Amazon Resource Name (ARN) of a core network.
- destinationPrefix stringList Id 
- The ID of a managed prefix list destination of the route. - One of the following target arguments must be supplied: 
- egressOnly stringGateway Id 
- Identifier of a VPC Egress Only Internet Gateway.
- gatewayId string
- Identifier of a VPC internet gateway or a virtual private gateway.
- instanceId string
- Identifier of an EC2 instance.
- ipv6CidrBlock string
- The Ipv6 CIDR block of the route
- natGateway stringId 
- Identifier of a VPC NAT gateway.
- networkInterface stringId 
- Identifier of an EC2 network interface.
- transitGateway stringId 
- Identifier of an EC2 Transit Gateway.
- vpcEndpoint stringId 
- Identifier of a VPC Endpoint. This route must be removed prior to VPC Endpoint deletion.
- vpcPeering stringConnection Id 
- Identifier of a VPC peering connection. - Note that the default route, mapping the VPC's CIDR block to "local", is created implicitly and cannot be specified. 
- cidr_block str
- The CIDR block of the route.
- core_network_ strarn 
- The Amazon Resource Name (ARN) of a core network.
- destination_prefix_ strlist_ id 
- The ID of a managed prefix list destination of the route. - One of the following target arguments must be supplied: 
- egress_only_ strgateway_ id 
- Identifier of a VPC Egress Only Internet Gateway.
- gateway_id str
- Identifier of a VPC internet gateway or a virtual private gateway.
- instance_id str
- Identifier of an EC2 instance.
- ipv6_cidr_ strblock 
- The Ipv6 CIDR block of the route
- nat_gateway_ strid 
- Identifier of a VPC NAT gateway.
- network_interface_ strid 
- Identifier of an EC2 network interface.
- transit_gateway_ strid 
- Identifier of an EC2 Transit Gateway.
- vpc_endpoint_ strid 
- Identifier of a VPC Endpoint. This route must be removed prior to VPC Endpoint deletion.
- vpc_peering_ strconnection_ id 
- Identifier of a VPC peering connection. - Note that the default route, mapping the VPC's CIDR block to "local", is created implicitly and cannot be specified. 
- cidrBlock String
- The CIDR block of the route.
- coreNetwork StringArn 
- The Amazon Resource Name (ARN) of a core network.
- destinationPrefix StringList Id 
- The ID of a managed prefix list destination of the route. - One of the following target arguments must be supplied: 
- egressOnly StringGateway Id 
- Identifier of a VPC Egress Only Internet Gateway.
- gatewayId String
- Identifier of a VPC internet gateway or a virtual private gateway.
- instanceId String
- Identifier of an EC2 instance.
- ipv6CidrBlock String
- The Ipv6 CIDR block of the route
- natGateway StringId 
- Identifier of a VPC NAT gateway.
- networkInterface StringId 
- Identifier of an EC2 network interface.
- transitGateway StringId 
- Identifier of an EC2 Transit Gateway.
- vpcEndpoint StringId 
- Identifier of a VPC Endpoint. This route must be removed prior to VPC Endpoint deletion.
- vpcPeering StringConnection Id 
- Identifier of a VPC peering connection. - Note that the default route, mapping the VPC's CIDR block to "local", is created implicitly and cannot be specified. 
Import
Using pulumi import, import Default VPC route tables using the vpc_id. For example:
$ pulumi import aws:ec2/defaultRouteTable:DefaultRouteTable example vpc-33cc44dd
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.