Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

[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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant