fugue / regula

Regula checks infrastructure as code templates (Terraform, CloudFormation, k8s manifests) for AWS, Azure, Google Cloud, and Kubernetes security and compliance using Open Policy Agent/Rego

Home Page:https://regula.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] examples/aws/useast1_only.reg not working

anden-dev opened this issue · comments

Describe the bug

I am interested in custom rules for aws so I was exploring the examples and found the region rule not working.

How you're running Regula

  • I'm using Regula v2.9.2 as a CLI tool and my Terraform source code as an input:
  • I'm using the example from this repo with checked out v2.9.2
regula run --include ./rego/examples/aws/useast1_only.rego $TERRAFORM_PROJECT_HOME/main.tf

No problems found.

main.tf is a minimal

provider "aws" {
  region = "eu-central-1"
}

Operating System
Darwin Kernel Version 21.6.0 root:xnu-8020.140.49~2/RELEASE_ARM64_T8101

Additional context

regula version  
2.9.2, build b41673e, built with OPA v0.43.1

your tests are passing

regula test .                                           
INFO Loaded 252 IaC configurations as test inputs 
PASS: 285/285

I would expect region = "eu-central-1" to fail.