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.
Inherited Members
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class MainRouteTableAssociation : CustomResource
Constructors
View SourceMainRouteTableAssociation(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 SourceOriginalRouteTableId
Used internally, see Notes below
Declaration
public Output<string> OriginalRouteTableId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
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 SourceGet(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 |