I am currently working on Sentinel, following this guide on github (terraform-guides/governance/third-generation/azure at master · hashicorp/terraform-guides · GitHub).
I am getting the error
Import "tfplan/v2" is not available when trying to run it from your guide, as well as in my own code (which is more or less a copy paste of your guide).
Here is what my folders organisation looks like:
├── test │ └── policy-one | └── fail.hcl | └── pass.hcl | └── mock-tfplan-fail.sentinel | └── mock-tfplan-pass.sentinel | ├── sentinel.hcl └── policy-one.sentinel └── azure-functions └── common functions #this is located outside of the folder in the guide. In my personal code, I have brought it at the same level and adjusted the code to target it
I am currently in the situation where
sentinel test passes for both of my mocks, but
sentinel apply is not accepted.
I have had a look at this other topic (How to write Sentinel policies - #3 by rberlind) but it wasn’t too clear what I was supposed to do. I understand
tfplan/v2 refers to the terraform plan, but I thought the mocks would be used…?
Apologies, this is my first time working on Sentinel.