8000 Add resource type hierarchy for smart ignore by eliecharra Β· Pull Request #1131 Β· snyk/driftctl Β· GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add resource type hierarchy for smart ignore #1131

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

Merged
merged 1 commit into from
Oct 14, 2021
Merged

Conversation

eliecharra
Copy link
Contributor
@eliecharra eliecharra commented Oct 12, 2021
Q A
πŸ› Bug fix? yes
πŸš€ New feature? no
⚠ Deprecations? no
❌ BC Break no
πŸ”— Related issues none
❓ Documentation no

Description

This PR add resource type hierarchy. It allows to avoid to ignore a type if at least any of its child type is not ignored.

For example if you ignore everything but aws_route then aws_route_table should not be ignored too since we need parent resource to be present ( for expander middlewares for example)
aws_route will be ignored in any ways during the analysis part since we use IsResourceIgnored

@codecov
Copy link
codecov bot commented Oct 12, 2021

Codecov Report

Merging #1131 (e9dc238) into main (ca49fa2) will increase coverage by 5.86%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1131      +/-   ##
==========================================
+ Coverage   75.56%   81.43%   +5.86%     
==========================================
  Files         368      317      -51     
  Lines       13563    11601    -1962     
==========================================
- Hits        10249     9447     -802     
+ Misses       3065     1917    -1148     
+ Partials      249      237      -12     
Impacted Files Coverage Ξ”
pkg/filter/driftignore.go 95.23% <100.00%> (+1.48%) ⬆️
pkg/resource/resource_types.go 100.00% <100.00%> (ΓΈ)
pkg/terraform/plugin_client.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/remote/aws/client/s3_client_factory.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/remote/aws/init.go 0.00% <0.00%> (-95.06%) ⬇️
pkg/remote/google/repository/storage.go 0.00% <0.00%> (-76.93%) ⬇️
pkg/remote/github/init.go 0.00% <0.00%> (-76.32%) ⬇️
pkg/remote/azurerm/provider.go 0.00% <0.00%> (-75.76%) ⬇️
pkg/remote/azurerm/init.go 0.00% <0.00%> (-73.92%) ⬇️
pkg/remote/google/init.go 0.00% <0.00%> (-70.00%) ⬇️
... and 102 more

@eliecharra eliecharra force-pushed the add_resource_hierarchy branch from cbcc250 to 0d689b8 Compare October 13, 2021 08:37
@eliecharra eliecharra marked this pull request as ready for review October 13, 2021 08:37
@eliecharra eliecharra requested a review from a team as a code owner October 13, 2021 08:37
@eliecharra eliecharra force-pushed the add_resource_hierarchy branch from 0d689b8 to efc6b38 Compare October 13, 2021 14:41
@eliecharra eliecharra requested a review from sundowndev October 13, 2021 14:41
@eliecharra eliecharra force-pushed the add_resource_hierarchy branch from efc6b38 to a1308a6 Compare October 14, 2021 08:34
sundowndev
sundowndev previously approved these changes Oct 14, 2021
@eliecharra eliecharra force-pushed the add_resource_hierarchy branch 3 times, most recently from 5a26e6d to ef2d8e7 Compare October 14, 2021 12:15
@eliecharra eliecharra requested a review from a team October 14, 2021 12:50
@eliecharra eliecharra self-assigned this Oct 14, 2021
sundowndev
sundowndev previously approved these changes Oct 14, 2021
@eliecharra eliecharra force-pushed the add_resource_hierarchy branch from aef7475 to e9dc238 Compare October 14, 2021 13:08
@eliecharra eliecharra merged commit 5d859f7 into main Oct 14, 2021
@eliecharra eliecharra deleted the add_resource_hierarchy branch October 14, 2021 13:26
@sundowndev sundowndev added the kind/bug Something isn't working label Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
6219
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0