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

[Question] Running rego against terraform module instance #364

Open
jcortega opened this issue Oct 14, 2022 · 0 comments
Open

[Question] Running rego against terraform module instance #364

jcortega opened this issue Oct 14, 2022 · 0 comments

Comments

@jcortega
Copy link

jcortega commented Oct 14, 2022

Is it possible to run a rego policy against module instance without running terraform init? For example, I just want to make sure that Terraform module consumers use vetted modules and module numbers. I tried inspecting input data via regula repl, but it seems that module instance is not included in the data.

main.tf

module "custom_module" {
 source = "xyz"
 b = "1"
}

data snippet:

  "main_tf": {
    "mock_config": {
      "hcl_resource_view_version": "0.0.1",
      "resources": {}
    },
    "mock_input": {
      "resources": {}
    },
    "mock_resources": {}
  },
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