-
Notifications
You must be signed in to change notification settings - Fork 4.4k
fix(elasticache): security group for ServerlessCache does not use default endpoint port
#35738
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
Conversation
… use endpoint port
ServerlessCache does not use endpoint portServerlessCache does not use default endpoint port
mazyu36
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fix!
Pull request has been modified.
|
|
||||||||||||||
|
|
||||||||||||||
|
@Mergifyio update |
✅ Branch has been successfully updated |
|
@gasolima Thanks for your approval. Could you please approve again? |
|
@go-to-k approved, i was testing the new workflow that deploy the integration test 😅 and it worked! |
|
@Mergifyio update |
✅ Branch has been successfully updated |
|
@gasolima Could you please merge? |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Merge Queue Status✅ The pull request has been merged at 9d2091d This pull request spent 40 minutes 35 seconds in the queue, including 40 minutes 24 seconds running CI. Required conditions to merge
|
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
N/A
Reason for this change
A security group ingress for the new
ServerlessCacheconstruct does not use an endpoint port.The following CDK code generates an INVALID CFn template with
nullforFromPortandToPort:An expected template:
FYI: The method
cache.connections.defaultPort?.toRuleJson()outputs{"Value":{"ipProtocol":"tcp","fromPort":null,"toPort":null}}. But we expect{"Value":{"ipProtocol":"tcp","fromPort":{"Fn::GetAtt":["Cache18F6EE16","Endpoint.Port"]},"toPort":{"Fn::GetAtt":["Cache18F6EE16","Endpoint.Port"]}}}.Description of changes
Use
Token.asNumberfor thedefaultPortofConnectionsinServerlessCache:this.connections = new ec2.Connections({ securityGroups: this.securityGroups, - defaultPort: ec2.Port.tcp(Lazy.number({ produce: () => parseInt(this.serverlessCacheEndpointPort) })), + defaultPort: ec2.Port.tcp(Token.asNumber(this.serverlessCacheEndpointPort)), });Describe any new or updated permissions being added
Description of how you validated changes
Both an unit test and an integ test.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license