We recommend new projects start with resources from the AWS provider.
aws-native.ec2.SubnetRouteTableAssociation
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
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:
- Route
Table Id This property is required. string - The ID of the route table. The physical ID changes when the route table ID is changed.
- Subnet
Id This property is required. string - The ID of the subnet.
- Route
Table Id This property is required. string - The ID of the route table. The physical ID changes when the route table ID is changed.
- Subnet
Id This property is required. string - The ID of the subnet.
- route
Table Id This property is required. String - The ID of the route table. The physical ID changes when the route table ID is changed.
- subnet
Id This property is required. String - The ID of the subnet.
- route
Table Id This property is required. string - The ID of the route table. The physical ID changes when the route table ID is changed.
- subnet
Id 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.
- route
Table Id This property is required. String - The ID of the route table. The physical ID changes when the route table ID is changed.
- subnet
Id 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:
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.