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

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

AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi

aws-native.ec2.SubnetRouteTableAssociation

Explore with Pulumi AI

aws-native logo

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

AWS Native v0.126.0 published on Monday, Sep 30, 2024 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 string
    The unique name of the resource.
    args SubnetRouteTableAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args SubnetRouteTableAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SubnetRouteTableAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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

    The SubnetRouteTableAssociation resource accepts the following input properties:

    RouteTableId string
    The ID of the route table. The physical ID changes when the route table ID is changed.
    SubnetId string
    The ID of the subnet.
    RouteTableId string
    The ID of the route table. The physical ID changes when the route table ID is changed.
    SubnetId string
    The ID of the subnet.
    routeTableId String
    The ID of the route table. The physical ID changes when the route table ID is changed.
    subnetId String
    The ID of the subnet.
    routeTableId string
    The ID of the route table. The physical ID changes when the route table ID is changed.
    subnetId string
    The ID of the subnet.
    route_table_id str
    The ID of the route table. The physical ID changes when the route table ID is changed.
    subnet_id str
    The ID of the subnet.
    routeTableId String
    The ID of the route table. The physical ID changes when the route table ID is changed.
    subnetId 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
    aws-native logo

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

    AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi