Skip to content
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

Possibility to use an resource in conditions. #209

Open
alexandresavicki opened this issue Jul 17, 2020 · 0 comments
Open

Possibility to use an resource in conditions. #209

alexandresavicki opened this issue Jul 17, 2020 · 0 comments

Comments

@alexandresavicki
Copy link

Hello, would it be possible to use a resource in a condition? For example:

Write a rule that validates resource aws_s3_bucket_public_access_block.block_public_acls = true only if's aws_s3_bucket.acl = private

An example of this rule would be something like this:

  - id: BLOCK_CREATE_S3
    message: Can't create S3 with public access if it's a private bucket.
    categorys: 
      - resource
    recources: 
      - aws_s3_bucket_public_access_block
    conditions:
          - key: aws_s3_bucket.acl
            op: eq
            value: private
    assertions:
      - key: block_public_acls
        op: eq
        value: "true"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant