Is there a way to define a required related resource e.g.
GIVEN I have aws_s3_bucket defined
THEN aws_s3_bucket_server_side_encryption_configuration resource must exist
AND it must have bucket
AND it must be in {aws_s3_bucket_server_side_encryption_configuration.values.bucket}
@noskip
Scenario: Ensure all S3 buckets have server side encryption
Given I have aws_s3_bucket defined
Given I have aws_s3_bucket_server_side_encryption_configuration defined
Then it must have bucket
Then it must be in {aws_s3_bucket_server_side_encryption_configuration.values.bucket}
even though bucket_2 doesn't have a corresponding server side encryption.
I would like to make sure that standalone logging, versioning, encryption and similar s3 bucket resources exist for every s3 bucket.
Is there a way to define a required related resource e.g.
This issue is rather similar but given this TF:
the following scenario succeeds:
even though bucket_2 doesn't have a corresponding server side encryption.
I would like to make sure that standalone logging, versioning, encryption and similar s3 bucket resources exist for every s3 bucket.