Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws appmesh(module name): port filter missing #22452

Closed
SGFGOV opened this issue Oct 11, 2022 · 3 comments · Fixed by #25112
Closed

aws appmesh(module name): port filter missing #22452

SGFGOV opened this issue Oct 11, 2022 · 3 comments · Fixed by #25112
Assignees
Labels
@aws-cdk/aws-appmesh Related to AWS App Mesh bug This issue is a bug. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p2

Comments

@SGFGOV
Copy link

SGFGOV commented Oct 11, 2022

Describe the bug

Unable to add match port

I'm defining a gateway route like

 const route = gateway?.addGatewayRoute(
        `${this.props.containerApplicationName}-web-route`,
        {
          routeSpec: appmesh.GatewayRouteSpec.http({
            routeTarget: containerApplicationService,
            match: {
              hostname: GatewayRouteHostnameMatch.exactly(
                `${
                  this.props.containerApplicationName
                }.domainName`
              ),
              rewriteRequestHostname: true,
            },
          }),
        }
      );

I get this error Gateway route must define a match port if the parent Virtual Gateway has multiple listeners
I'm using the same virtual gateway for multiple for multiple virtual service routers.

Expected Behavior

automatically associate router ports

Current Behavior

Gateway route must define a match port if the parent Virtual Gateway has multiple listeners. (Se
rvice: AWSAppMesh; Status Code: 400; Error Code: BadRequestException; Request ID: 2da86d7b-7348-
4345-b25d-6804389a0e01; Proxy: null)

Reproduction Steps

const containerPorts = props.containers!.map((container) => {
      return { containerPort: parseInt(container.containerApi.port) };
    });
    GenericContainerServiceConstruct.externalPortMappings = containerPorts;

const gateway = new appmesh.VirtualGateway(scope, `${id}-virtual-gateway`, {
      mesh: GenericContainerServiceConstruct.mesh,
      listeners: containerPorts .map((port) => {
        return appmesh.VirtualGatewayListener.http({ port });
      }),
    });

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.45.0

Framework Version

No response

Node.js Version

16

OS

AMI linux 2

Language

Typescript

Language Version

No response

Other information

No response

@SGFGOV SGFGOV added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 11, 2022
@github-actions github-actions bot added the @aws-cdk/aws-appmesh Related to AWS App Mesh label Oct 11, 2022
@SGFGOV
Copy link
Author

SGFGOV commented Oct 11, 2022

node_modules/aws-cdk-lib/aws-appmesh/lib/appmesh.generated.d.ts
is missing port in interface HttpGatewayRouteMatchProperty, which is defined in
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-gatewayroute-httpgatewayroutematch.html#cfn-appmesh-gatewayroute-httpgatewayroutematch-headers

@SGFGOV SGFGOV changed the title aws appmesh(module name): (short issue description) aws appmesh(module name): port filter missing Oct 11, 2022
@peterwoodworth
Copy link
Contributor

Thanks for the feature request! You can fill in this functionality for now with an escape hatch

You're right that we don't support port. We'd need to ultimately supply it here

I am marking this issue as p2, which means that we are unable to work on this immediately.

We use +1s to help prioritize our work, and are happy to revaluate this issue based on community feedback. You can reach out to the cdk.dev community on Slack to solicit support for reprioritization.

Check out our contributing guide if you're interested in contributing yourself - there's a low chance the team will be able to address this soon but we'll try to review a PR 🙂

@peterwoodworth peterwoodworth added p2 effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md and removed needs-triage This issue or PR still needs to be triaged. labels Nov 30, 2022
@mergify mergify bot closed this as completed in #25112 Apr 20, 2023
mergify bot pushed a commit that referenced this issue Apr 20, 2023
Closes #22452 

Adds `port` property to the `HttpGatewayRouteMatch` interface along with a unit test to validate the change.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-appmesh Related to AWS App Mesh bug This issue is a bug. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants