1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. ec2
  5. SubnetRouteTableAssociation

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

aws-native.ec2.SubnetRouteTableAssociation

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

Associates a subnet with a route table. The subnet and route table must be in the same VPC. This association causes traffic originating from the subnet to be routed according to the routes in the route table. A route table can be associated with multiple subnets. To create a route table, see AWS::EC2::RouteTable.

Create SubnetRouteTableAssociation Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new SubnetRouteTableAssociation(name: string, args: SubnetRouteTableAssociationArgs, opts?: CustomResourceOptions);
@overload
def SubnetRouteTableAssociation(resource_name: str,
                                args: SubnetRouteTableAssociationArgs,
                                opts: Optional[ResourceOptions] = None)

@overload
def SubnetRouteTableAssociation(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                route_table_id: Optional[str] = None,
                                subnet_id: Optional[str] = None)
func NewSubnetRouteTableAssociation(ctx *Context, name string, args SubnetRouteTableAssociationArgs, opts ...ResourceOption) (*SubnetRouteTableAssociation, error)
public SubnetRouteTableAssociation(string name, SubnetRouteTableAssociationArgs args, CustomResourceOptions? opts = null)
public SubnetRouteTableAssociation(String name, SubnetRouteTableAssociationArgs args)
public SubnetRouteTableAssociation(String name, SubnetRouteTableAssociationArgs args, CustomResourceOptions options)
type: aws-native:ec2:SubnetRouteTableAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SubnetRouteTableAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SubnetRouteTableAssociationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SubnetRouteTableAssociationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SubnetRouteTableAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SubnetRouteTableAssociationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

SubnetRouteTableAssociation 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 SubnetRouteTableAssociation resource accepts the following input properties:

RouteTableId This property is required. string
The ID of the route table. The physical ID changes when the route table ID is changed.
SubnetId This property is required. string
The ID of the subnet.
RouteTableId This property is required. string
The ID of the route table. The physical ID changes when the route table ID is changed.
SubnetId This property is required. string
The ID of the subnet.
routeTableId This property is required. String
The ID of the route table. The physical ID changes when the route table ID is changed.
subnetId This property is required. String
The ID of the subnet.
routeTableId This property is required. string
The ID of the route table. The physical ID changes when the route table ID is changed.
subnetId This property is required. string
The ID of the subnet.
route_table_id This property is required. str
The ID of the route table. The physical ID changes when the route table ID is changed.
subnet_id This property is required. str
The ID of the subnet.
routeTableId This property is required. String
The ID of the route table. The physical ID changes when the route table ID is changed.
subnetId This property is required. String
The ID of the subnet.

Outputs

All input properties are implicitly available as output properties. Additionally, the SubnetRouteTableAssociation resource produces the following output properties:

AwsId string
The ID of the subnet route table association.
Id string
The provider-assigned unique ID for this managed resource.
AwsId string
The ID of the subnet route table association.
Id string
The provider-assigned unique ID for this managed resource.
awsId String
The ID of the subnet route table association.
id String
The provider-assigned unique ID for this managed resource.
awsId string
The ID of the subnet route table association.
id string
The provider-assigned unique ID for this managed resource.
aws_id str
The ID of the subnet route table association.
id str
The provider-assigned unique ID for this managed resource.
awsId String
The ID of the subnet route table association.
id String
The provider-assigned unique ID for this managed resource.

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi