-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
module name
in violation summary for terraform scans (#774)
* add module name to resource config * add method to get child configs * fix failing tests
- Loading branch information
1 parent
a3f26c1
commit cb2be19
Showing
40 changed files
with
435 additions
and
240 deletions.
There are no files selected for viewing
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
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
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
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
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
80 changes: 43 additions & 37 deletions
80
pkg/iac-providers/terraform/v12/testdata/tfjson/deep-modules.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,46 @@ | ||
{ | ||
"aws_s3_bucket": [ | ||
{ | ||
"id": "aws_s3_bucket.bucket", | ||
"name": "bucket", | ||
"source": "modules/m1/main.tf", | ||
"plan_root": "./", | ||
"line": 20, | ||
"type": "aws_s3_bucket", | ||
"config": { | ||
"bucket": "${module.m3.fullbucketname}", | ||
"policy": "${module.m2.fullbucketpolicy}" | ||
} | ||
"aws_s3_bucket": [ | ||
{ | ||
"id": "aws_s3_bucket.bucket", | ||
"name": "bucket", | ||
"module_name": "m1", | ||
"source": "modules/m1/main.tf", | ||
"plan_root": "./", | ||
"line": 20, | ||
"type": "aws_s3_bucket", | ||
"config": { | ||
"bucket": "${module.m3.fullbucketname}", | ||
"policy": "${module.m2.fullbucketpolicy}" | ||
}, | ||
{ | ||
"id": "aws_s3_bucket.bucket", | ||
"name": "bucket", | ||
"source": "modules/m4/main.tf", | ||
"plan_root": "./", | ||
"line": 11, | ||
"type": "aws_s3_bucket", | ||
"config": { | ||
"bucket": "tf-test-project-2", | ||
"policy": "${module.m4a.fullbucketpolicy}" | ||
} | ||
"skip_rules": null | ||
}, | ||
{ | ||
"id": "aws_s3_bucket.bucket", | ||
"name": "bucket", | ||
"module_name": "m4", | ||
"source": "modules/m4/main.tf", | ||
"plan_root": "./", | ||
"line": 11, | ||
"type": "aws_s3_bucket", | ||
"config": { | ||
"bucket": "tf-test-project-2", | ||
"policy": "${module.m4a.fullbucketpolicy}" | ||
}, | ||
{ | ||
"id": "aws_s3_bucket.bucket4a", | ||
"name": "bucket4a", | ||
"source": "modules/m4/modules/m4a/main.tf", | ||
"plan_root": "./", | ||
"line": 20, | ||
"type": "aws_s3_bucket", | ||
"config": { | ||
"bucket": "${module.m4c.fullbucketname}", | ||
"policy": "${module.m4b.fullbucketpolicy}" | ||
} | ||
} | ||
] | ||
} | ||
"skip_rules": null | ||
}, | ||
{ | ||
"id": "aws_s3_bucket.bucket4a", | ||
"name": "bucket4a", | ||
"module_name": "m4a", | ||
"source": "modules/m4/modules/m4a/main.tf", | ||
"plan_root": "./", | ||
"line": 20, | ||
"type": "aws_s3_bucket", | ||
"config": { | ||
"bucket": "${module.m4c.fullbucketname}", | ||
"policy": "${module.m4b.fullbucketpolicy}" | ||
}, | ||
"skip_rules": null | ||
} | ||
] | ||
} |
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
Oops, something went wrong.