-
-
Notifications
You must be signed in to change notification settings - Fork 3
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: properties from struct #45
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ekristen
changed the title
feature: properties from struct
feat: properties from struct
Mar 28, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #45 +/- ##
==========================================
+ Coverage 95.09% 95.62% +0.53%
==========================================
Files 15 16 +1
Lines 897 1006 +109
==========================================
+ Hits 853 962 +109
Misses 26 26
Partials 18 18 ☔ View full report in Codecov by Sentry. |
ekristen
force-pushed
the
feat-props-from-struct
branch
from
March 28, 2024 22:17
b37d299
to
2a85fad
Compare
ekristen
force-pushed
the
feat-props-from-struct
branch
from
March 28, 2024 22:22
2a85fad
to
f93ed89
Compare
🎉 This pull request is included in version 0.14.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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This is laying the groundwork for allowing the aws-nuke and azure-nuke tool to update their Resource definitions to have exported variables that are then used to build the properties automatically vs having to define them manually.
There are two benefits to this, the first being that we can make the code cleaner and more simple by removing a bunch of for loops for tags, but we can also now programmatically generate documentation by inspecting the resource structs to document what properties are available.
This might make the resource structs get a little more verbose, but in the end, it'll make the use of the tool better.
Type Support
Note: all pointers are dereferenced during evaluation
Features
property:"-"
will omit a field from being exported as a propertyproperty:"prefix=vpc"
will ensure the value of the field or the tags are prefixed withvpc
Example
This automatically will create properties for Name, Region and Tags.
Benchmark