Skip to content

Conversation

@mazyu36
Copy link
Contributor

@mazyu36 mazyu36 commented Jul 4, 2025

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 VPCSecurityGroups to the fromLookup method 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

@github-actions github-actions bot added the p2 label Jul 4, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team July 4, 2025 11:16
@github-actions github-actions bot added the distinguished-contributor [Pilot] contributed 50+ PRs to the CDK label Jul 4, 2025
@mazyu36 mazyu36 changed the title fix(rds): can not lookup VPC Security Groups by fromLookup method fix(rds): can not lookup VPC Security Groups with fromLookup method Jul 4, 2025
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jul 4, 2025
Comment on lines 128 to 139
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',
},
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@go-to-k go-to-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. LGTM.

@aws-cdk-automation aws-cdk-automation added pr/needs-maintainer-review This PR needs a review from a Core Team Member and removed pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Jul 29, 2025
@vishaalmehrishi vishaalmehrishi self-assigned this Aug 4, 2025
Copy link
Contributor

@vishaalmehrishi vishaalmehrishi left a 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.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Aug 4, 2025
@mergify mergify bot dismissed vishaalmehrishi’s stale review August 4, 2025 12:19

Pull request has been modified.

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Aug 4, 2025
@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Aug 4, 2025
@mergify mergify bot dismissed vishaalmehrishi’s stale review August 4, 2025 14:40

Pull request has been modified.

vishaalmehrishi
vishaalmehrishi previously approved these changes Aug 4, 2025
@mergify
Copy link
Contributor

mergify bot commented Aug 4, 2025

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).

@mergify
Copy link
Contributor

mergify bot commented Aug 4, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

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.
If you think this was a flaky issue, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

@vishaalmehrishi
Copy link
Contributor

@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

@mazyu36
Copy link
Contributor Author

mazyu36 commented Aug 4, 2025

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Aug 4, 2025

update

❌ Mergify doesn't have permission to update

For security reasons, Mergify can't update this pull request. Try updating locally.
GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/pr-build.yml without workflows permission

@mergify mergify bot dismissed vishaalmehrishi’s stale review August 4, 2025 15:29

Pull request has been modified.

@mergify
Copy link
Contributor

mergify bot commented Aug 4, 2025

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-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: e7fe3ca
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit ae87e26 into aws:main Aug 4, 2025
22 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

distinguished-contributor [Pilot] contributed 50+ PRs to the CDK p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants