-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fixing a problem while reading the plan (#494) If a state file contains "child_modules", below error is thrown. So this commit will handle the case of supporting child modules. ERROR: state.out.json is not a valid terraform plan json output. * Update terraform_compliance/common/readable_plan.py Co-authored-by: Emre Erkunt <[email protected]> * Update tests/functional/test_child_modules/main.tf Co-authored-by: Emre Erkunt <[email protected]> Co-authored-by: Praveen Shilavantar <[email protected]> Co-authored-by: Emre Erkunt <[email protected]>
- Loading branch information
1 parent
a0ad396
commit c6de57a
Showing
4 changed files
with
23 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
resource "aws_s3_bucket" "fail" { | ||
bucket = "some_random_bucket_name-123808h0i1h3085018g531" | ||
acl = "private" | ||
|
||
server_side_encryption_configuration { | ||
rule { | ||
apply_server_side_encryption_by_default { | ||
kms_master_key_id = "123456" | ||
sse_algorithm = "aws:kms" | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{"format_version":"0.1","terraform_version":"0.12.12","values":{"root_module":{"child_modules":[{"resources":[{"address":"aws_s3_bucket.fail","mode":"managed","type":"aws_s3_bucket","name":"fail","provider_name":"aws","schema_version":0,"values":{"acl":"private","bucket":"some_random_bucket_name-123808h0i1h3085018g531","bucket_prefix":null,"cors_rule":[],"force_destroy":false,"lifecycle_rule":[],"logging":[],"object_lock_configuration":[],"policy":null,"replication_configuration":[],"server_side_encryption_configuration":[{"rule":[{"apply_server_side_encryption_by_default":[{"kms_master_key_id":"123456","sse_algorithm":"aws:kms"}]}]}],"tags":null,"website":[]}}]}]}}} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Feature: Feature for issue 494, adding support for Child Modules | ||
This features confirms if child modules is supported | ||
|
||
@noskip | ||
Scenario: Check if an S3 bucket is encrypted | ||
Given I have aws_s3_bucket defined | ||
Then it must contain server_side_encryption_configuration |