Class RouteTableAssociation
Provides a resource to create an association between a route table and a subnet or a route table and an internet gateway or virtual private gateway.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var routeTableAssociation = new Aws.Ec2.RouteTableAssociation("routeTableAssociation", new Aws.Ec2.RouteTableAssociationArgs
{
SubnetId = aws_subnet.Foo.Id,
RouteTableId = aws_route_table.Bar.Id,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class RouteTableAssociation : CustomResource
Constructors
View SourceRouteTableAssociation(String, RouteTableAssociationArgs, CustomResourceOptions)
Create a RouteTableAssociation resource with the given unique name, arguments, and options.
Declaration
public RouteTableAssociation(string name, RouteTableAssociationArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| RouteTableAssociationArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceGatewayId
The gateway ID to create an association. Conflicts with subnet_id.
Declaration
public Output<string> GatewayId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RouteTableId
The ID of the routing table to associate with.
Declaration
public Output<string> RouteTableId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SubnetId
The subnet ID to create an association. Conflicts with gateway_id.
Declaration
public Output<string> SubnetId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, RouteTableAssociationState, CustomResourceOptions)
Get an existing RouteTableAssociation resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static RouteTableAssociation Get(string name, Input<string> id, RouteTableAssociationState 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. |
| RouteTableAssociationState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| RouteTableAssociation |