-
Notifications
You must be signed in to change notification settings - Fork 4.3k
fix(rds): can not lookup VPC Security Groups with fromLookup method #34906
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
| describe('DatabaseInstanceBase from lookup with empty DBSecurityGroups and valid VPCSecurityGroups', () => { | ||
| test('return correct instance info', () => { | ||
| // GIVEN | ||
| const resultObjs = [ | ||
| { | ||
| 'DBInstanceArn': 'arn:aws:rds:us-east-1:123456789012:db:instance-1', | ||
| 'Endpoint.Address': 'instance-1.testserver.us-east-1.rds.amazonaws.com', | ||
| 'Endpoint.Port': '5432', | ||
| 'DbiResourceId': 'db-ABCDEFGHI', | ||
| 'VPCSecurityGroups': ['sg-1', 'sg-2'], | ||
| 'Identifier': 'instance-1', | ||
| }, |
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.
with empty DBSecurityGroups
DBSecurityGroups is a property that ceases to exist and does not appear in the resultObjs, what is the intent of this test?
Even if this is what you intended, wouldn't it confuse the developer at a later time since it is the name of a property that doesn't exist now and is unspecified, not empty?
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.
You are correct. This test is unnecessary.
I have removed it.
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.
Thanks. LGTM.
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 your contribution! I've requested some changes to ensure backward compatibility.
Pull request has been modified.
Pull request has been modified.
|
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). |
|
This pull request has been removed from the queue for the following reason: The pull request can't be updated. You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. |
|
@mazyu36 you might need to update your fork/branch with the latest from main. Mergify is not able to rebase because of permissions: https://github.com/aws/aws-cdk/pull/34906/checks?check_run_id=47345276993 |
|
@Mergifyio update |
❌ Mergify doesn't have permission to updateFor security reasons, Mergify can't update this pull request. Try updating locally. |
Pull request has been modified.
|
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). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
N/A
Reason for this change
Currently, the fromLookup method uses
DBSecurityGroups, which is designed for EC2-Classic resources.However, since EC2-Classic was retired, this property is no longer relevant.
Reference:
Description of changes
Added
VPCSecurityGroupsto thefromLookupmethod to properly handle VPC security group lookups.Describe any new or updated permissions being added
N/A
Description of how you validated changes
Add unit tests 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