Skip to content

(app-mesh): Missing port property in GrpcRouteMatch construct #25810

@neovasili

Description

@neovasili

Describe the bug

While the CfnRoute give us the ability to define a gRPC match route rule specifying the port, the L2 construct GrpcRouteMatch does not have that property (only have service_name, method_name and metadata), leveraging us to use L1 constructs instead if we want to use the port matcher.

Expected Behavior

GrpcRouteMatch L2 construct also let us specify the port matcher option.

Current Behavior

GrpcRouteMatch L2 construct does not have the property port.

Reproduction Steps

Example in python; the following is not valid code:

appmesh.RouteSpec.grpc(
    match=appmesh.GrpcRouteMatch(port=1234),
    weighted_targets=[appmesh.WeightedTarget(virtual_node=node)],
)

We need to use L1 construct, to get the same result:

appmesh.CfnRoute.RouteSpecProperty(
    grpc_route=appmesh.CfnRoute.GrpcRouteProperty(
        action=appmesh.CfnRoute.GrpcRouteActionProperty(
            weighted_targets=[appmesh.CfnRoute.WeightedTargetProperty(
                virtual_node=node.virtual_node_name,
                weight=1,
            )],
        ),
        match=appmesh.CfnRoute.GrpcRouteMatchProperty(port=1234),
    ),
)

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.81.0

Framework Version

2.81.0

Node.js Version

v16.14.2

OS

MacOs Ventura

Language

Python

Language Version

python 3.11.1

Other information

I have checked through the CDK docs that typescript CDK version have the same issue, so I guess this applies to all languages available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-appmeshRelated to AWS App Mesheffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.good first issueRelated to contributions. See CONTRIBUTING.mdp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions