Open ozmodiar192 opened 2 years ago
It looks like "target_bucket" is not in the stash:
"aws_s3_bucket_logging": [
{
"expected_bucket_owner": null,
"target_grant": [],
"target_prefix": "chhec-s3-access-log-bucket/",
"terraform-compliance.mounted": true
},
{
"expected_bucket_owner": null,
"target_grant": [],
"target_prefix": "chhec-s3-access-log-bucket/",
"terraform-compliance.mounted": true
},
{
"expected_bucket_owner": null,
"target_grant": [],
"target_prefix": "chhec-s3-access-log-bucket/",
"terraform-compliance.mounted": true
},
{
"expected_bucket_owner": null,
"target_grant": [],
"target_prefix": "chhec-s3-access-log-bucket/",
"terraform-compliance.mounted": true
}
],
Description
I am attempting to validate that a bucket with access logging enabled is not pointing to itself as the target_bucket.
To Reproduce
Create an s3 bucket with a separate aws_s3_bucket_logging resource. Set the target_bucket to the same bucket you're creating. This is a terrible idea so don't apply it. Try to verify the value for "target_bucket" is not the same bucket you're creating.
Feature File:
Plan File:
Sample Terraform Code:
Error Output:
Expected Behavior: I would expect it to fail, but it succeeds:
Tested Versions:
1.3.32
1.1.l7
3.10
Additional Context: I just started using terraform-compliance and it's entirely likely I'm doing something wrong.