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

fix: get subnet_ids from all interfaces on an EC2 instance #8500

Merged
merged 3 commits into from Apr 19, 2023

Conversation

paladin-dranser
Copy link
Contributor

An EC2 instance may have multiple network interfaces where each
interface may be deployed in different subnets.
As a result, EC2 instance is available in multiple subnets so
that we have to check all of them in 'subnet' filter, not only
default one

Use Case:
Need to make sure that EC2 instances is not deployed
in public subnets. In that case, we have to check both
primary and secondary interfaces because some of them may be
deployed in a public subnet.

Copy link
Member

@ajkerrigan ajkerrigan left a comment

Choose a reason for hiding this comment

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

Thanks, looks like a good change to me. One nit, might be worth ditching some of the noise in the recorded test data. Looks like we're pulling in 39 instances, 34 of which are terminated.

An EC2 instance may have multiple network interfaces where each
interface may be deployed in different subnets.
As a result, EC2 instance is available in multiple subnets so
that we have to check all of them in 'subnet' filter, not only
default one

Use Case:

Need to make sure that EC2 instances is not deployed
in public subnets. In that case, we have to check both
primary and secondary interfaces because some of them may be
deployed in a public subnet.
@paladin-dranser
Copy link
Contributor Author

Hi @ajkerrigan,
Thanks, good point. Updated test data.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 19, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: paladin-dranser / name: Antoś Bućko (eddcde3, 8ca8ed2)
  • ✅ login: ajkerrigan / name: AJ Kerrigan (9250da5)

Copy link
Member

@ajkerrigan ajkerrigan left a comment

Choose a reason for hiding this comment

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

Thanks! Looks even better now 😎

@ajkerrigan ajkerrigan merged commit 62283f2 into cloud-custodian:main Apr 19, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants