Expand description
Provides a resource for managing the main routing table of a VPC.
NOTE: Do not use both
aws.ec2.DefaultRouteTable
to manage a default route table andaws.ec2.MainRouteTableAssociation
with the same VPC due to possible route conflicts. See aws.ec2.DefaultRouteTable documentation for more details. For more information, see the Amazon VPC User Guide on [Route Tables][aws-route-tables]. For information about managing normal route tables in Pulumi, see [aws.ec2.RouteTable
][tf-route-tables].
§Example Usage
use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
let a = main_route_table_association::create(
"a",
MainRouteTableAssociationArgs::builder()
.route_table_id("${bar.id}")
.vpc_id("${foo.id}")
.build_struct(),
);
}
§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.
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments