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

feat: allow resource to hook the parent item for modification #57

Merged
merged 5 commits into from
Jun 11, 2024

Conversation

ekristen
Copy link
Owner

@ekristen ekristen commented Jun 10, 2024

Overview

This is a set of modifications to allow better alignment in the azure-nuke variant. Due to how azure APIs work, you have to globally query, but we still want to maintain the regional aspect. Also with Azure there is a lot of commonality in resources, so these changes allow for changing of the regional information at scan time, and allows for properties to be exposed from composition.

Features

  • BeforeEnqueue hook that is optional on a resource, this allows the resource to modify the item before being put on the queue.

    The primary use case for this is that with Azure we cannot scan by region, we can to scan by tenant, subscription and resource group, therefore, this allows us to swap out the scanning owner to the actual region once it's discovered. The side affect is that resources may appear out of order when attributed to specific regions.

  • Properties from Struct Composition - allows inlining properities for a struct composition.

Copy link

codecov bot commented Jun 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.72%. Comparing base (649088d) to head (2aa8ee4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #57      +/-   ##
==========================================
+ Coverage   97.70%   97.72%   +0.02%     
==========================================
  Files          17       17              
  Lines        1047     1057      +10     
==========================================
+ Hits         1023     1033      +10     
  Misses         13       13              
  Partials       11       11              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ekristen ekristen merged commit 4362964 into main Jun 11, 2024
7 checks passed
@ekristen ekristen deleted the feat-azure-item-hook branch June 11, 2024 22:26
@ekristen
Copy link
Owner Author

🎉 This pull request is included in version 0.16.0 🎉

The release is available on GitHub release 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant