aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.55k stars 3.87k forks source link

feat(ec2): security group lookup via filters #30625

Closed jdukewich closed 1 month ago

jdukewich commented 3 months ago

Issue # (if applicable)

Closes #30331.

Reason for this change

This will improve the security group lookup functionality for importing existing security groups into a CDK stack.

Description of changes

I added the ability to lookup existing security groups via more filters. Filters are supported by the DescribeSecurityGroups API, and using these filters can be immensely useful for looking up existing security groups, especially if your account or organization follows predictable rules regarding things like security group tags.

Description of how you validated changes

I added unit tests similar to the ones that test the normal lookup by ID or name.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

jdukewich commented 3 months ago

Clarification Request

Does this feature need a new integration test? If so, I'm struggling to figure out how to write one for a lookup like this.

jdukewich commented 3 months ago

Exemption Request

TheRealAmazonKendra commented 2 months ago

Hi there, I happened to be looking at this while you merged from main. In general, to do so please use the mergify command instead of using the button. @Mergifyio update

jdukewich commented 2 months ago

Hi there, I happened to be looking at this while you merged from main. In general, to do so please use the mergify command instead of using the button. @Mergifyio update

@TheRealAmazonKendra Will do. Out of curiosity, why is that preferred?

jdukewich commented 2 months ago

@Mergifyio update

mergify[bot] commented 2 months ago

update

✅ Branch has been successfully updated

jdukewich commented 2 months ago

@Mergifyio update

mergify[bot] commented 2 months ago

update

✅ Branch has been successfully updated

aws-cdk-automation commented 2 months ago

This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week.

jdukewich commented 2 months ago

@Mergifyio update

mergify[bot] commented 2 months ago

update

✅ Branch has been successfully updated

jdukewich commented 2 months ago

@Mergifyio update

mergify[bot] commented 2 months ago

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/close-stale-prs.yml` without `workflows` permission
jdukewich commented 2 months ago

@Mergifyio update

mergify[bot] commented 2 months ago

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/close-stale-prs.yml` without `workflows` permission
xazhao commented 1 month ago

@Mergifyio update

mergify[bot] commented 1 month ago

update

✅ Branch has been successfully updated

xazhao commented 1 month ago

@Mergifyio update

mergify[bot] commented 1 month ago

update

✅ Branch has been successfully updated

xazhao commented 1 month ago

All tests passed. Adding the cli tested label.

aws-cdk-automation commented 1 month ago

AWS CodeBuild CI Report

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

mergify[bot] commented 1 month ago

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

github-actions[bot] commented 1 month ago

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.

TheRealAmazonKendra commented 1 month ago

We are now using an externally published version of cloud assembly schema. This needs to be reverted as it conflicts with that.